C++ API Reference for Intel® Data Analytics Acceleration Library 2020 Update 1

decision_forest_training_parameter.h
1 /* file: decision_forest_training_parameter.h */
2 /*******************************************************************************
3 * Copyright 2014-2020 Intel Corporation
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *******************************************************************************/
17 
18 /*
19 //++
20 // Decision forest training parameter class
21 //--
22 */
23 
24 #ifndef __DECISION_FOREST_TRAINING_PARAMETER_H__
25 #define __DECISION_FOREST_TRAINING_PARAMETER_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "data_management/data/data_serialize.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/engines/mt2203/mt2203.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
45 namespace decision_forest
46 {
50 namespace training
51 {
60 enum VariableImportanceMode
61 {
62  none, /* Do not compute */
63  MDI, /* Mean Decrease Impurity.
64  Computed as the sum of weighted impurity decreases for all nodes where the variable is used,
65  averaged over all trees in the forest */
66  MDA_Raw, /* Mean Decrease Accuracy (permutation importance).
67  For each tree, the prediction error on the out-of-bag portion of the data is computed
68  (error rate for classification, MSE for regression).
69  The same is done after permuting each predictor variable.
70  The difference between the two are then averaged over all trees. */
71  MDA_Scaled /* Mean Decrease Accuracy (permutation importance).
72  This is MDA_Raw value scaled by its standard deviation. */
73 };
74 
79 enum ResultToComputeId
80 {
81  computeOutOfBagError = 0x00000001ULL,
82  computeOutOfBagErrorPerObservation = 0x00000002ULL
83 };
84 
88 namespace interface1
89 {
90 
97 /* [Parameter source code] */
98 class DAAL_EXPORT Parameter
99 {
100 public:
101  Parameter() : nTrees(100),
102  observationsPerTreeFraction(1.),
103  featuresPerNode(0), maxTreeDepth(0),
104  minObservationsInLeafNode(0),
105  seed(77),
106  impurityThreshold(0.),
107  varImportance(none),
108  resultsToCompute(0),
109  memorySavingMode(false),
110  bootstrap(true),
111  engine(engines::mt2203::Batch<>::create()) {}
112 
113  size_t nTrees;
114  double observationsPerTreeFraction;
116  size_t featuresPerNode;
119  size_t maxTreeDepth;
120  size_t minObservationsInLeafNode;
122  size_t seed;
123  engines::EnginePtr engine;
124  double impurityThreshold;
126  VariableImportanceMode varImportance;
127  DAAL_UINT64 resultsToCompute;
128  bool memorySavingMode;
129  bool bootstrap;
130 };
131 /* [Parameter source code] */
132 } // namespace interface1
133 using interface1::Parameter;
135 } // namespace training
136 }
137 }
138 } // namespace daal
139 #endif
daal::algorithms::decision_forest::training::interface1::Parameter::maxTreeDepth
size_t maxTreeDepth
Definition: decision_forest_training_parameter.h:119
daal::algorithms::decision_forest::training::VariableImportanceMode
VariableImportanceMode
Variable importance computation mode.
Definition: decision_forest_training_parameter.h:60
daal::algorithms::decision_forest::training::ResultToComputeId
ResultToComputeId
Definition: decision_forest_training_parameter.h:79
daal::algorithms::decision_forest::training::interface1::Parameter::nTrees
size_t nTrees
Definition: decision_forest_training_parameter.h:113
daal::algorithms::decision_forest::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_training_parameter.h:98
daal::algorithms::decision_forest::training::interface1::Parameter::observationsPerTreeFraction
double observationsPerTreeFraction
Definition: decision_forest_training_parameter.h:114
daal::algorithms::decision_forest::training::interface1::Parameter::memorySavingMode
bool memorySavingMode
Definition: decision_forest_training_parameter.h:128
daal::algorithms::decision_forest::training::interface1::Parameter::seed
size_t seed
Definition: decision_forest_training_parameter.h:122
daal_defines.h
daal::algorithms::decision_forest::training::interface1::Parameter::minObservationsInLeafNode
size_t minObservationsInLeafNode
Definition: decision_forest_training_parameter.h:120
daal::algorithms::decision_forest::training::interface1::Parameter::varImportance
VariableImportanceMode varImportance
Definition: decision_forest_training_parameter.h:126
daal::algorithms::decision_forest::training::interface1::Parameter::bootstrap
bool bootstrap
Definition: decision_forest_training_parameter.h:129
daal::algorithms::decision_forest::training::interface1::Parameter::resultsToCompute
DAAL_UINT64 resultsToCompute
Definition: decision_forest_training_parameter.h:127
daal::algorithms::decision_forest::training::interface1::Parameter::engine
engines::EnginePtr engine
Definition: decision_forest_training_parameter.h:123
daal::algorithms::decision_forest::training::interface1::Parameter::impurityThreshold
double impurityThreshold
Definition: decision_forest_training_parameter.h:124
daal::algorithms::decision_forest::training::interface1::Parameter::featuresPerNode
size_t featuresPerNode
Definition: decision_forest_training_parameter.h:116

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