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

decision_forest_training_parameter.h
1 /* file: decision_forest_training_parameter.h */
2 /*******************************************************************************
3 * Copyright 2014-2017 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 };
107 
111 namespace interface1
112 {
113 
120 /* [Parameter source code] */
121 class DAAL_EXPORT Parameter
122 {
123 public:
124  Parameter() : nTrees(100),
125  observationsPerTreeFraction(1.),
126  featuresPerNode(0), maxTreeDepth(0),
127  minObservationsInLeafNode(0),
128  seed(77),
129  impurityThreshold(0.),
130  varImportance(none),
131  resultsToCompute(0),
132  memorySavingMode(false),
133  bootstrap(true),
134  engine(engines::mt19937::Batch<>::create()) {}
135 
136  size_t nTrees;
137  double observationsPerTreeFraction;
139  size_t featuresPerNode;
142  size_t maxTreeDepth;
143  size_t minObservationsInLeafNode;
145  size_t seed;
146  engines::EnginePtr engine;
147  double impurityThreshold;
149  VariableImportanceMode varImportance;
150  DAAL_UINT64 resultsToCompute;
151  bool memorySavingMode;
152  bool bootstrap;
153 };
154 /* [Parameter source code] */
155 } // namespace interface1
156 using interface1::Parameter;
158 } // namespace training
159 }
160 }
161 } // namespace daal
162 #endif
daal::algorithms::decision_forest::training::interface1::Parameter::engine
engines::EnginePtr engine
Definition: decision_forest_training_parameter.h:146
daal::algorithms::decision_forest::training::interface1::Parameter::bootstrap
bool bootstrap
Definition: decision_forest_training_parameter.h:152
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::training::interface1::Parameter::maxTreeDepth
size_t maxTreeDepth
Definition: decision_forest_training_parameter.h:142
daal::algorithms::decision_forest::training::interface1::Parameter::impurityThreshold
double impurityThreshold
Definition: decision_forest_training_parameter.h:147
daal::algorithms::decision_forest::training::interface1::Parameter::minObservationsInLeafNode
size_t minObservationsInLeafNode
Definition: decision_forest_training_parameter.h:143
daal_defines.h
daal::algorithms::decision_forest::training::interface1::Parameter::resultsToCompute
DAAL_UINT64 resultsToCompute
Definition: decision_forest_training_parameter.h:150
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:121
daal::algorithms::decision_forest::training::interface1::Parameter::observationsPerTreeFraction
double observationsPerTreeFraction
Definition: decision_forest_training_parameter.h:137
daal::algorithms::decision_forest::training::interface1::Parameter::memorySavingMode
bool memorySavingMode
Definition: decision_forest_training_parameter.h:151
daal::algorithms::decision_forest::training::interface1::Parameter::nTrees
size_t nTrees
Definition: decision_forest_training_parameter.h:136
daal::algorithms::decision_forest::training::interface1::Parameter::featuresPerNode
size_t featuresPerNode
Definition: decision_forest_training_parameter.h:139
daal::algorithms::decision_forest::training::interface1::Parameter::varImportance
VariableImportanceMode varImportance
Definition: decision_forest_training_parameter.h:149
daal::algorithms::decision_forest::training::interface1::Parameter::seed
size_t seed
Definition: decision_forest_training_parameter.h:145
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.