C++ API Reference for Intel® Data Analytics Acceleration Library 2018 Update 2

decision_forest_training_parameter.h
1 /* file: decision_forest_training_parameter.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation
4 * All Rights Reserved.
5 *
6 * If this software was obtained under the Intel Simplified Software License,
7 * the following terms apply:
8 *
9 * The source code, information and material ("Material") contained herein is
10 * owned by Intel Corporation or its suppliers or licensors, and title to such
11 * Material remains with Intel Corporation or its suppliers or licensors. The
12 * Material contains proprietary information of Intel or its suppliers and
13 * licensors. The Material is protected by worldwide copyright laws and treaty
14 * provisions. No part of the Material may be used, copied, reproduced,
15 * modified, published, uploaded, posted, transmitted, distributed or disclosed
16 * in any way without Intel's prior express written permission. No license under
17 * any patent, copyright or other intellectual property rights in the Material
18 * is granted to or conferred upon you, either expressly, by implication,
19 * inducement, estoppel or otherwise. Any license under such intellectual
20 * property rights must be express and approved by Intel in writing.
21 *
22 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
23 * notice or any other notice embedded in Materials by Intel or Intel's
24 * suppliers or licensors in any way.
25 *
26 *
27 * If this software was obtained under the Apache License, Version 2.0 (the
28 * "License"), the following terms apply:
29 *
30 * You may not use this file except in compliance with the License. You may
31 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
32 *
33 *
34 * Unless required by applicable law or agreed to in writing, software
35 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
36 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 *
38 * See the License for the specific language governing permissions and
39 * limitations under the License.
40 *******************************************************************************/
41 
42 /*
43 //++
44 // Decision forest training parameter class
45 //--
46 */
47 
48 #ifndef __DECISION_FOREST_TRAINING_PARAMETER_H__
49 #define __DECISION_FOREST_TRAINING_PARAMETER_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/numeric_table.h"
53 #include "data_management/data/data_serialize.h"
54 #include "services/daal_defines.h"
55 #include "algorithms/engines/mt19937/mt19937.h"
56 
57 namespace daal
58 {
59 namespace algorithms
60 {
69 namespace decision_forest
70 {
74 namespace training
75 {
84 enum VariableImportanceMode
85 {
86  none, /* Do not compute */
87  MDI, /* Mean Decrease Impurity.
88  Computed as the sum of weighted impurity decreases for all nodes where the variable is used,
89  averaged over all trees in the forest */
90  MDA_Raw, /* Mean Decrease Accuracy (permutation importance).
91  For each tree, the prediction error on the out-of-bag portion of the data is computed
92  (error rate for classification, MSE for regression).
93  The same is done after permuting each predictor variable.
94  The difference between the two are then averaged over all trees. */
95  MDA_Scaled /* Mean Decrease Accuracy (permutation importance).
96  This is MDA_Raw value scaled by its standard deviation. */
97 };
98 
103 enum ResultToComputeId
104 {
105  computeOutOfBagError = 0x00000001ULL,
106  computeOutOfBagErrorPerObservation = 0x00000002ULL
107 };
108 
112 namespace interface1
113 {
114 
121 /* [Parameter source code] */
122 class DAAL_EXPORT Parameter
123 {
124 public:
125  Parameter() : nTrees(100),
126  observationsPerTreeFraction(1.),
127  featuresPerNode(0), maxTreeDepth(0),
128  minObservationsInLeafNode(0),
129  seed(77),
130  impurityThreshold(0.),
131  varImportance(none),
132  resultsToCompute(0),
133  memorySavingMode(false),
134  bootstrap(true),
135  engine(engines::mt19937::Batch<>::create()) {}
136 
137  size_t nTrees;
138  double observationsPerTreeFraction;
140  size_t featuresPerNode;
143  size_t maxTreeDepth;
144  size_t minObservationsInLeafNode;
146  size_t seed;
147  engines::EnginePtr engine;
148  double impurityThreshold;
150  VariableImportanceMode varImportance;
151  DAAL_UINT64 resultsToCompute;
152  bool memorySavingMode;
153  bool bootstrap;
154 };
155 /* [Parameter source code] */
156 } // namespace interface1
157 using interface1::Parameter;
159 } // namespace training
160 }
161 }
162 } // namespace daal
163 #endif
daal::algorithms::decision_forest::training::interface1::Parameter::engine
engines::EnginePtr engine
Definition: decision_forest_training_parameter.h:147
daal::algorithms::decision_forest::training::interface1::Parameter::bootstrap
bool bootstrap
Definition: decision_forest_training_parameter.h:153
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::training::interface1::Parameter::maxTreeDepth
size_t maxTreeDepth
Definition: decision_forest_training_parameter.h:143
daal::algorithms::decision_forest::training::interface1::Parameter::impurityThreshold
double impurityThreshold
Definition: decision_forest_training_parameter.h:148
daal::algorithms::decision_forest::training::interface1::Parameter::minObservationsInLeafNode
size_t minObservationsInLeafNode
Definition: decision_forest_training_parameter.h:144
daal_defines.h
daal::algorithms::decision_forest::training::VariableImportanceMode
VariableImportanceMode
Variable importance computation mode.
Definition: decision_forest_training_parameter.h:84
daal::algorithms::decision_forest::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_training_parameter.h:122
daal::algorithms::decision_forest::training::interface1::Parameter::observationsPerTreeFraction
double observationsPerTreeFraction
Definition: decision_forest_training_parameter.h:138
daal::algorithms::decision_forest::training::interface1::Parameter::memorySavingMode
bool memorySavingMode
Definition: decision_forest_training_parameter.h:152
daal::algorithms::engines::mt19937::interface1::Batch
Provides methods for mt19937 engine computations in the batch processing mode.
Definition: mt19937.h:113
daal::algorithms::decision_forest::training::interface1::Parameter::nTrees
size_t nTrees
Definition: decision_forest_training_parameter.h:137
daal::algorithms::decision_forest::training::interface1::Parameter::featuresPerNode
size_t featuresPerNode
Definition: decision_forest_training_parameter.h:140
daal::algorithms::decision_forest::training::interface1::Parameter::varImportance
VariableImportanceMode varImportance
Definition: decision_forest_training_parameter.h:150
daal::algorithms::decision_forest::training::interface1::Parameter::seed
size_t seed
Definition: decision_forest_training_parameter.h:146
daal::algorithms::decision_forest::training::ResultToComputeId
ResultToComputeId
Definition: decision_forest_training_parameter.h:103

For more complete information about compiler optimizations, see our Optimization Notice.