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

decision_forest_regression_training_types.h
1 /* file: decision_forest_regression_training_types.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 // Implementation of the decision forest regression training algorithm interface
45 //--
46 */
47 
48 #ifndef __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_H__
49 #define __DECISION_FOREST_REGRESSION_TRAINIG_TYPES_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/decision_forest/decision_forest_regression_model.h"
56 #include "algorithms/decision_forest/decision_forest_training_parameter.h"
57 #include "algorithms/regression/regression_training_types.h"
58 
59 namespace daal
60 {
61 namespace algorithms
62 {
66 namespace decision_forest
67 {
68 namespace regression
69 {
79 namespace training
80 {
85 enum Method
86 {
87  defaultDense = 0
88 };
89 
94 enum InputId
95 {
96  data = algorithms::regression::training::data,
97  dependentVariable = algorithms::regression::training::dependentVariables,
98  lastInputId = dependentVariable
99 };
100 
105 enum ResultId
106 {
107  model = algorithms::regression::training::model,
108  lastResultId = model
109 };
110 
115 enum ResultNumericTableId
116 {
117  outOfBagError = lastResultId + 1,
118  variableImportance,
120  lastResultNumericTableId = variableImportance
121 };
122 
126 namespace interface1
127 {
134 /* [Parameter source code] */
135 class DAAL_EXPORT Parameter : public daal::algorithms::Parameter, public daal::algorithms::decision_forest::training::Parameter
136 {
137 public:
138  Parameter();
139  services::Status check() const DAAL_C11_OVERRIDE;
140 };
141 /* [Parameter source code] */
142 
147 class DAAL_EXPORT Input : public algorithms::regression::training::Input
148 {
149 public:
151  Input();
152 
154  Input(const Input& other) : algorithms::regression::training::Input(other){}
155 
156  virtual ~Input() {};
157 
163  data_management::NumericTablePtr get(InputId id) const;
164 
170  void set(InputId id, const data_management::NumericTablePtr &value);
171 
178  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
179 };
180 
186 class DAAL_EXPORT Result : public algorithms::regression::training::Result
187 {
188 public:
189  DECLARE_SERIALIZABLE_CAST(Result)
190  Result();
191 
199  template<typename algorithmFPType>
200  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const Parameter *parameter, const int method);
201 
207  decision_forest::regression::ModelPtr get(ResultId id) const;
208 
214  void set(ResultId id, const ModelPtr &value);
215 
221  data_management::NumericTablePtr get(ResultNumericTableId id) const;
222 
228  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
229 
237  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
238 
239 protected:
241  template<typename Archive, bool onDeserialize>
242  services::Status serialImpl(Archive *arch)
243  {
244  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
245  }
246 };
247 typedef services::SharedPtr<Result> ResultPtr;
248 
249 } // namespace interface1
250 using interface1::Parameter;
251 using interface1::Input;
252 using interface1::Result;
253 using interface1::ResultPtr;
254 
255 } // namespace training
257 } // namespace regression
258 }
259 }
260 } // namespace daal
261 #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:186
daal::algorithms::decision_forest::regression::training::interface1::Input
Input objects for decision forest model-based training
Definition: decision_forest_regression_training_types.h:147
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::regression::training::interface1::Input::Input
Input(const Input &other)
Definition: decision_forest_regression_training_types.h:154
daal::algorithms::decision_forest::regression::training::Method
Method
Computation methods for decision forest regression model-based training.
Definition: decision_forest_regression_training_types.h:85
daal::algorithms::decision_forest::regression::training::data
Definition: decision_forest_regression_training_types.h:96
daal::algorithms::decision_forest::regression::training::model
Definition: decision_forest_regression_training_types.h:107
daal::algorithms::decision_forest::regression::training::variableImportance
Definition: decision_forest_regression_training_types.h:118
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:94
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:115
daal::algorithms::decision_forest::regression::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_regression_training_types.h:135
daal::algorithms::regression::training::model
Definition: regression_training_types.h:89
daal::algorithms::decision_forest::regression::training::dependentVariable
Definition: decision_forest_regression_training_types.h:97
daal::algorithms::decision_forest::regression::training::outOfBagError
Definition: decision_forest_regression_training_types.h:117
daal::algorithms::decision_forest::regression::training::defaultDense
Definition: decision_forest_regression_training_types.h:87
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:79
daal::algorithms::regression::training::data
Definition: regression_training_types.h:78
daal::algorithms::math::abs::value
Definition: abs_types.h:112
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:105

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