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

decision_forest_regression_training_types.h
1 /* file: decision_forest_regression_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 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 
104 enum ResultEngineId
105 {
106  updatedEngine = lastResultNumericTableId + 1,
107  lastResultEngineId = updatedEngine
108 };
109 
113 namespace interface1
114 {
121 /* [Parameter source code] */
122 class DAAL_EXPORT Parameter : public daal::algorithms::Parameter, public daal::algorithms::decision_forest::training::Parameter
123 {
124 public:
125  Parameter();
126  services::Status check() const DAAL_C11_OVERRIDE;
127 };
128 /* [Parameter source code] */
129 
134 class DAAL_EXPORT Input : public algorithms::regression::training::Input
135 {
136 public:
138  Input();
139 
141  Input(const Input& other) : algorithms::regression::training::Input(other){}
142 
143  virtual ~Input() {};
144 
150  data_management::NumericTablePtr get(InputId id) const;
151 
157  void set(InputId id, const data_management::NumericTablePtr &value);
158 
165  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
166 };
167 
173 class DAAL_EXPORT Result : public algorithms::regression::training::Result
174 {
175 public:
176  DECLARE_SERIALIZABLE_CAST(Result)
177  Result();
178  virtual ~Result();
179 
187  template<typename algorithmFPType>
188  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const Parameter *parameter, const int method);
189 
195  decision_forest::regression::ModelPtr get(ResultId id) const;
196 
202  void set(ResultId id, const ModelPtr &value);
203 
209  data_management::NumericTablePtr get(ResultNumericTableId id) const;
210 
216  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
217 
225  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
226 
232  engines::EnginePtr get(ResultEngineId id) const;
233 
234 protected:
236  template<typename Archive, bool onDeserialize>
237  services::Status serialImpl(Archive *arch)
238  {
239  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
240  }
241 
242 public:
243  class ResultImpl;
244 
245  ResultImpl* impl() { return _impl; }
246 
247  Result( const Result& other );
248 
249 private:
250  ResultImpl* _impl;
251 };
252 typedef services::SharedPtr<Result> ResultPtr;
253 
254 } // namespace interface1
255 using interface1::Parameter;
256 using interface1::Input;
257 using interface1::Result;
258 using interface1::ResultPtr;
259 
260 } // namespace training
262 } // namespace regression
263 }
264 }
265 } // namespace daal
266 #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:173
daal::algorithms::decision_forest::regression::training::interface1::Input
Input objects for decision forest model-based training
Definition: decision_forest_regression_training_types.h:134
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:141
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::ResultEngineId
ResultEngineId
Available identifiers of the result of decision forest model-based training.
Definition: decision_forest_regression_training_types.h:104
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:122
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::updatedEngine
Definition: decision_forest_regression_training_types.h:106
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.