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

decision_forest_regression_training_types.h
1 /* file: decision_forest_regression_training_types.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 // Implementation of the decision forest regression training algorithm interface
21 //--
22 */
23 
24 #ifndef __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_H__
25 #define __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_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/decision_forest/decision_forest_regression_model.h"
32 #include "algorithms/decision_forest/decision_forest_training_parameter.h"
33 #include "algorithms/regression/regression_training_types.h"
34 
35 namespace daal
36 {
37 namespace algorithms
38 {
42 namespace decision_forest
43 {
44 namespace regression
45 {
55 namespace training
56 {
61 enum Method
62 {
63  defaultDense = 0
64 };
65 
70 enum InputId
71 {
72  data = algorithms::regression::training::data,
73  dependentVariable = algorithms::regression::training::dependentVariables,
74  lastInputId = dependentVariable
75 };
76 
81 enum ResultId
82 {
83  model = algorithms::regression::training::model,
84  lastResultId = model
85 };
86 
91 enum ResultNumericTableId
92 {
93  outOfBagError = lastResultId + 1,
95  variableImportance,
97  outOfBagErrorPerObservation,
99  lastResultNumericTableId = outOfBagErrorPerObservation
100 };
101 
106 enum ResultEngineId
107 {
108  updatedEngine = lastResultNumericTableId + 1,
109  lastResultEngineId = updatedEngine
110 };
111 
115 namespace interface1
116 {
123 /* [Parameter source code] */
124 class DAAL_EXPORT Parameter : public daal::algorithms::Parameter, public daal::algorithms::decision_forest::training::Parameter
125 {
126 public:
127  Parameter();
128  services::Status check() const DAAL_C11_OVERRIDE;
129 };
130 /* [Parameter source code] */
131 
136 class DAAL_EXPORT Input : public algorithms::regression::training::Input
137 {
138 public:
140  Input();
141 
143  Input(const Input& other) : algorithms::regression::training::Input(other){}
144 
145  virtual ~Input() {};
146 
152  data_management::NumericTablePtr get(InputId id) const;
153 
159  void set(InputId id, const data_management::NumericTablePtr &value);
160 
167  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
168 };
169 
175 class DAAL_EXPORT Result : public algorithms::regression::training::Result
176 {
177 public:
178  DECLARE_SERIALIZABLE_CAST(Result)
179  Result();
180  virtual ~Result();
181 
189  template<typename algorithmFPType>
190  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const Parameter *parameter, const int method);
191 
197  decision_forest::regression::ModelPtr get(ResultId id) const;
198 
204  void set(ResultId id, const ModelPtr &value);
205 
211  data_management::NumericTablePtr get(ResultNumericTableId id) const;
212 
218  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
219 
227  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
228 
234  engines::EnginePtr get(ResultEngineId id) const;
235 
236 protected:
238  template<typename Archive, bool onDeserialize>
239  services::Status serialImpl(Archive *arch)
240  {
241  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
242  }
243 
244 public:
245  class ResultImpl;
246 
247  ResultImpl* impl() { return _impl; }
248 
249  Result( const Result& other );
250 
251 private:
252  ResultImpl* _impl;
253 };
254 typedef services::SharedPtr<Result> ResultPtr;
255 
256 } // namespace interface1
257 using interface1::Parameter;
258 using interface1::Input;
259 using interface1::Result;
260 using interface1::ResultPtr;
261 
262 } // namespace training
264 } // namespace regression
265 }
266 }
267 } // namespace daal
268 #endif
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:106
daal::algorithms::decision_forest::regression::training::variableImportance
Definition: decision_forest_regression_training_types.h:95
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:175
daal::algorithms::decision_forest::regression::training::outOfBagError
Definition: decision_forest_regression_training_types.h:93
daal::algorithms::decision_forest::regression::training::updatedEngine
Definition: decision_forest_regression_training_types.h:108
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:55
daal_defines.h
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:81
daal::algorithms::decision_forest::regression::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_regression_training_types.h:124
daal::algorithms::decision_forest::regression::training::data
Definition: decision_forest_regression_training_types.h:72
daal::algorithms::decision_forest::regression::training::Method
Method
Computation methods for decision forest regression model-based training.
Definition: decision_forest_regression_training_types.h:61
daal::algorithms::regression::training::data
Definition: regression_training_types.h:54
daal::algorithms::decision_forest::regression::training::interface1::Input::Input
Input(const Input &other)
Definition: decision_forest_regression_training_types.h:143
daal::algorithms::decision_forest::regression::training::defaultDense
Definition: decision_forest_regression_training_types.h:63
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:91
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:70
daal::algorithms::decision_forest::regression::training::interface1::Input
Input objects for decision forest model-based training
Definition: decision_forest_regression_training_types.h:136
daal::algorithms::regression::training::model
Definition: regression_training_types.h:66
daal::algorithms::decision_forest::regression::training::outOfBagErrorPerObservation
Definition: decision_forest_regression_training_types.h:97
daal::algorithms::decision_forest::regression::training::dependentVariable
Definition: decision_forest_regression_training_types.h:73
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::decision_forest::regression::training::model
Definition: decision_forest_regression_training_types.h:83

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