C++ API Reference for Intel® Data Analytics Acceleration Library 2019

decision_forest_regression_training_types.h
1 /* file: decision_forest_regression_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the decision forest regression training algorithm interface
19 //--
20 */
21 
22 #ifndef __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_H__
23 #define __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/data_serialize.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/decision_forest/decision_forest_regression_model.h"
30 #include "algorithms/decision_forest/decision_forest_training_parameter.h"
31 #include "algorithms/regression/regression_training_types.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
40 namespace decision_forest
41 {
42 namespace regression
43 {
53 namespace training
54 {
59 enum Method
60 {
61  defaultDense = 0
62 };
63 
68 enum InputId
69 {
70  data = algorithms::regression::training::data,
71  dependentVariable = algorithms::regression::training::dependentVariables,
72  lastInputId = dependentVariable
73 };
74 
79 enum ResultId
80 {
81  model = algorithms::regression::training::model,
82  lastResultId = model
83 };
84 
89 enum ResultNumericTableId
90 {
91  outOfBagError = lastResultId + 1,
93  variableImportance,
95  outOfBagErrorPerObservation,
97  lastResultNumericTableId = outOfBagErrorPerObservation
98 };
99 
103 namespace interface1
104 {
111 /* [Parameter source code] */
112 class DAAL_EXPORT Parameter : public daal::algorithms::Parameter, public daal::algorithms::decision_forest::training::Parameter
113 {
114 public:
115  Parameter();
116  services::Status check() const DAAL_C11_OVERRIDE;
117 };
118 /* [Parameter source code] */
119 
124 class DAAL_EXPORT Input : public algorithms::regression::training::Input
125 {
126 public:
128  Input();
129 
131  Input(const Input& other) : algorithms::regression::training::Input(other){}
132 
133  virtual ~Input() {};
134 
140  data_management::NumericTablePtr get(InputId id) const;
141 
147  void set(InputId id, const data_management::NumericTablePtr &value);
148 
155  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
156 };
157 
163 class DAAL_EXPORT Result : public algorithms::regression::training::Result
164 {
165 public:
166  DECLARE_SERIALIZABLE_CAST(Result)
167  Result();
168 
176  template<typename algorithmFPType>
177  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const Parameter *parameter, const int method);
178 
184  decision_forest::regression::ModelPtr get(ResultId id) const;
185 
191  void set(ResultId id, const ModelPtr &value);
192 
198  data_management::NumericTablePtr get(ResultNumericTableId id) const;
199 
205  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
206 
214  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
215 
216 protected:
218  template<typename Archive, bool onDeserialize>
219  services::Status serialImpl(Archive *arch)
220  {
221  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
222  }
223 };
224 typedef services::SharedPtr<Result> ResultPtr;
225 
226 } // namespace interface1
227 using interface1::Parameter;
228 using interface1::Input;
229 using interface1::Result;
230 using interface1::ResultPtr;
231 
232 } // namespace training
234 } // namespace regression
235 }
236 }
237 } // namespace daal
238 #endif
daal::algorithms::decision_forest::regression::training::interface1::Result
Provides methods to access the result obtained with the compute() method of decision forest model-bas...
Definition: decision_forest_regression_training_types.h:163
daal::algorithms::decision_forest::regression::training::interface1::Input
Input objects for decision forest model-based training
Definition: decision_forest_regression_training_types.h:124
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_forest::regression::training::interface1::Input::Input
Input(const Input &other)
Definition: decision_forest_regression_training_types.h:131
daal::algorithms::decision_forest::regression::training::Method
Method
Computation methods for decision forest regression model-based training.
Definition: decision_forest_regression_training_types.h:59
daal::algorithms::decision_forest::regression::training::data
Definition: decision_forest_regression_training_types.h:70
daal::algorithms::decision_forest::regression::training::model
Definition: decision_forest_regression_training_types.h:81
daal::algorithms::decision_forest::regression::training::variableImportance
Definition: decision_forest_regression_training_types.h:93
daal_defines.h
daal::algorithms::decision_forest::regression::training::InputId
InputId
Available identifiers of input objects for decision forest model-based training.
Definition: decision_forest_regression_training_types.h:68
daal::algorithms::decision_forest::regression::training::ResultNumericTableId
ResultNumericTableId
Available identifiers of the result of decision forest model-based training.
Definition: decision_forest_regression_training_types.h:89
daal::algorithms::decision_forest::regression::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_regression_training_types.h:112
daal::algorithms::regression::training::model
Definition: regression_training_types.h:63
daal::algorithms::decision_forest::regression::training::dependentVariable
Definition: decision_forest_regression_training_types.h:71
daal::algorithms::decision_forest::regression::training::outOfBagError
Definition: decision_forest_regression_training_types.h:91
daal::algorithms::decision_forest::regression::training::defaultDense
Definition: decision_forest_regression_training_types.h:61
daal::algorithms::decision_forest::regression::training::outOfBagErrorPerObservation
Definition: decision_forest_regression_training_types.h:95
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:53
daal::algorithms::regression::training::data
Definition: regression_training_types.h:52
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::decision_forest::regression::training::ResultId
ResultId
Available identifiers of the result of decision forest model-based training.
Definition: decision_forest_regression_training_types.h:79

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