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

decision_forest_regression_training_types.h
1 /* file: decision_forest_regression_training_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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,
119  variableImportance,
121  outOfBagErrorPerObservation,
123  lastResultNumericTableId = outOfBagErrorPerObservation
124 };
125 
129 namespace interface1
130 {
137 /* [Parameter source code] */
138 class DAAL_EXPORT Parameter : public daal::algorithms::Parameter, public daal::algorithms::decision_forest::training::Parameter
139 {
140 public:
141  Parameter();
142  services::Status check() const DAAL_C11_OVERRIDE;
143 };
144 /* [Parameter source code] */
145 
150 class DAAL_EXPORT Input : public algorithms::regression::training::Input
151 {
152 public:
154  Input();
155 
157  Input(const Input& other) : algorithms::regression::training::Input(other){}
158 
159  virtual ~Input() {};
160 
166  data_management::NumericTablePtr get(InputId id) const;
167 
173  void set(InputId id, const data_management::NumericTablePtr &value);
174 
181  services::Status check(const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
182 };
183 
189 class DAAL_EXPORT Result : public algorithms::regression::training::Result
190 {
191 public:
192  DECLARE_SERIALIZABLE_CAST(Result)
193  Result();
194 
202  template<typename algorithmFPType>
203  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const Parameter *parameter, const int method);
204 
210  decision_forest::regression::ModelPtr get(ResultId id) const;
211 
217  void set(ResultId id, const ModelPtr &value);
218 
224  data_management::NumericTablePtr get(ResultNumericTableId id) const;
225 
231  void set(ResultNumericTableId id, const data_management::NumericTablePtr &value);
232 
240  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
241 
242 protected:
244  template<typename Archive, bool onDeserialize>
245  services::Status serialImpl(Archive *arch)
246  {
247  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
248  }
249 };
250 typedef services::SharedPtr<Result> ResultPtr;
251 
252 } // namespace interface1
253 using interface1::Parameter;
254 using interface1::Input;
255 using interface1::Result;
256 using interface1::ResultPtr;
257 
258 } // namespace training
260 } // namespace regression
261 }
262 }
263 } // namespace daal
264 #endif
daal::algorithms::regression::training::interface1::Result
Provides methods to access the result obtained with the compute() method of the regression model-base...
Definition: regression_training_types.h:168
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:189
daal::algorithms::regression::training::interface1::Input
Input objects for the regression model-based training
Definition: regression_training_types.h:102
daal::algorithms::decision_forest::regression::training::interface1::Input
Input objects for decision forest model-based training
Definition: decision_forest_regression_training_types.h:150
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
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:157
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_defines.h
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:79
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:138
daal::algorithms::decision_forest::regression::training::dependentVariable
Definition: decision_forest_regression_training_types.h:97
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:86
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::decision_forest::training::interface1::Parameter
Parameters for the decision forest algorithm.
Definition: decision_forest_training_parameter.h:122
daal::algorithms::regression::training::model
Definition: regression_training_types.h:89
daal::algorithms::decision_forest::regression::training::data
Definition: decision_forest_regression_training_types.h:96
daal::algorithms::decision_forest::regression::training::outOfBagErrorPerObservation
Definition: decision_forest_regression_training_types.h:121
daal::algorithms::decision_forest::regression::training::outOfBagError
Definition: decision_forest_regression_training_types.h:117
daal::algorithms::decision_forest::regression::training::variableImportance
Definition: decision_forest_regression_training_types.h:119
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::regression::training::data
Definition: regression_training_types.h:78
daal::algorithms::decision_forest::regression::training::defaultDense
Definition: decision_forest_regression_training_types.h:87
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
daal::algorithms::interface1::Input
Base class to represent computation input arguments. Algorithm-specific input arguments are represent...
Definition: algorithm_types.h:217
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::model
Definition: decision_forest_regression_training_types.h:107

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