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

decision_tree_regression_training_types.h
1 /* file: decision_tree_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 tree algorithm interface
21 //--
22 */
23 
24 #ifndef __DECISION_TREE_REGRESSION_TRAINING_TYPES_H__
25 #define __DECISION_TREE_REGRESSION_TRAINING_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/data_serialize.h"
29 #include "algorithms/decision_tree/decision_tree_regression_model.h"
30 #include "algorithms/regression/regression_training_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 
40 namespace decision_tree
41 {
42 
46 namespace regression
47 {
48 
58 namespace training
59 {
60 
65 enum Method
66 {
67  defaultDense = 0
68 };
69 
74 enum InputId
75 {
76  data = algorithms::regression::training::data,
77  dependentVariables = algorithms::regression::training::dependentVariables,
78  dataForPruning,
79  dependentVariablesForPruning,
80  weights = algorithms::regression::training::weights,
81  lastInputId = weights
82 };
83 
88 enum ResultId
89 {
90  model = algorithms::regression::training::model,
91  lastResultId = model
92 };
93 
97 namespace interface1
98 {
99 
104 class DAAL_EXPORT Input : public algorithms::regression::training::Input
105 {
106 public:
107  Input();
108  Input(const Input &other);
109 
115  data_management::NumericTablePtr get(decision_tree::regression::training::InputId id) const;
116 
122  void set(decision_tree::regression::training::InputId id, const data_management::NumericTablePtr & value);
123 
128  size_t getNumberOfFeatures() const;
129 
134  size_t getNumberOfDependentVariables() const;
135 
141  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
142 
143 protected:
144  services::Status checkImpl(const daal::algorithms::Parameter * parameter) const;
145 };
146 
151 class DAAL_EXPORT Result : public algorithms::regression::training::Result
152 {
153 public:
154  DECLARE_SERIALIZABLE_CAST(Result);
155  Result();
156 
162  ModelPtr get(ResultId id) const;
163 
170  template<typename algorithmFPType>
171  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const Parameter * parameter, int method);
172 
173 protected:
175  template<typename Archive, bool onDeserialize>
176  services::Status serialImpl(Archive * arch)
177  {
178  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
179  }
180 };
181 
182 typedef services::SharedPtr<Result> ResultPtr;
183 typedef services::SharedPtr<const Result> ResultConstPtr;
184 
185 } // namespace interface1
186 
187 using interface1::Input;
188 using interface1::Result;
189 using interface1::ResultPtr;
190 using interface1::ResultConstPtr;
191 
192 } // namespace training
194 } // namespace regression
195 } // namespace decision_tree
196 } // namespace algorithms
197 } // namespace daal
198 
199 #endif
daal::algorithms::decision_tree::regression::training::defaultDense
Definition: decision_tree_regression_training_types.h:67
daal::algorithms::decision_tree::regression::training::dataForPruning
Definition: decision_tree_regression_training_types.h:78
daal::algorithms::decision_tree::regression::training::ResultId
ResultId
Available identifiers of the result of decision tree model-based training.
Definition: decision_tree_regression_training_types.h:88
daal::algorithms::decision_tree::regression::training::data
Definition: decision_tree_regression_training_types.h:76
daal::algorithms::decision_tree::regression::training::InputId
InputId
Available identifiers of the results in the training stage of Decision tree.
Definition: decision_tree_regression_training_types.h:74
daal::algorithms::decision_tree::regression::training::dependentVariablesForPruning
Definition: decision_tree_regression_training_types.h:79
daal::algorithms::decision_tree::regression::training::Method
Method
Computation methods for Decision tree model-based training.
Definition: decision_tree_regression_training_types.h:65
daal::algorithms::decision_tree::regression::training::dependentVariables
Definition: decision_tree_regression_training_types.h:77
daal::algorithms::regression::training::dependentVariables
Definition: regression_training_types.h:55
daal::algorithms::decision_tree::regression::training::interface1::Result
Provides methods to access the result obtained with the compute() method of Decision tree model-based...
Definition: decision_tree_regression_training_types.h:151
daal::algorithms::decision_tree::regression::training::interface1::Input
Base class for the input objects in the training stage of the regression algorithms.
Definition: decision_tree_regression_training_types.h:104
daal::algorithms::regression::training::data
Definition: regression_training_types.h:54
daal::algorithms::regression::training::model
Definition: regression_training_types.h:66
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::decision_tree::regression::training::weights
Definition: decision_tree_regression_training_types.h:80
daal::algorithms::decision_tree::regression::training::model
Definition: decision_tree_regression_training_types.h:90
daal::algorithms::regression::training::weights
Definition: regression_training_types.h:56

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