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

decision_tree_regression_training_types.h
1 /* file: decision_tree_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 tree algorithm interface
45 //--
46 */
47 
48 #ifndef __DECISION_TREE_REGRESSION_TRAINING_TYPES_H__
49 #define __DECISION_TREE_REGRESSION_TRAINING_TYPES_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/data_serialize.h"
53 #include "algorithms/decision_tree/decision_tree_regression_model.h"
54 #include "algorithms/regression/regression_training_types.h"
55 
56 namespace daal
57 {
58 namespace algorithms
59 {
60 
64 namespace decision_tree
65 {
66 
70 namespace regression
71 {
72 
82 namespace training
83 {
84 
89 enum Method
90 {
91  defaultDense = 0
92 };
93 
98 enum InputId
99 {
100  data = algorithms::regression::training::data,
101  dependentVariables = algorithms::regression::training::dependentVariables,
102  dataForPruning ,
103  dependentVariablesForPruning ,
104  lastInputId = dependentVariablesForPruning
105 };
106 
111 enum ResultId
112 {
113  model = algorithms::regression::training::model,
114  lastResultId = model
115 };
116 
120 namespace interface1
121 {
122 
127 class DAAL_EXPORT Input : public algorithms::regression::training::Input
128 {
129 public:
130  Input();
131  Input(const Input &other);
132 
138  data_management::NumericTablePtr get(decision_tree::regression::training::InputId id) const;
139 
145  void set(decision_tree::regression::training::InputId id, const data_management::NumericTablePtr & value);
146 
151  size_t getNumberOfFeatures() const;
152 
157  size_t getNumberOfDependentVariables() const;
158 
164  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
165 
166 protected:
167  services::Status checkImpl(const daal::algorithms::Parameter * parameter) const;
168 };
169 
174 class DAAL_EXPORT Result : public algorithms::regression::training::Result
175 {
176 public:
177  DECLARE_SERIALIZABLE_CAST(Result);
178  Result();
179 
185  ModelPtr get(ResultId id) const;
186 
193  template<typename algorithmFPType>
194  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const Parameter * parameter, int method);
195 
196 protected:
198  template<typename Archive, bool onDeserialize>
199  services::Status serialImpl(Archive * arch)
200  {
201  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
202  }
203 };
204 
205 typedef services::SharedPtr<Result> ResultPtr;
206 typedef services::SharedPtr<const Result> ResultConstPtr;
207 
208 } // namespace interface1
209 
210 using interface1::Input;
211 using interface1::Result;
212 using interface1::ResultPtr;
213 using interface1::ResultConstPtr;
214 
215 } // namespace training
217 } // namespace regression
218 } // namespace decision_tree
219 } // namespace algorithms
220 } // namespace daal
221 
222 #endif
daal::algorithms::decision_tree::regression::training::dataForPruning
Definition: decision_tree_regression_training_types.h:102
daal::algorithms::decision_tree::regression::training::dependentVariables
Definition: decision_tree_regression_training_types.h:101
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:98
daal::algorithms::decision_tree::regression::training::Method
Method
Computation methods for Decision tree model-based training.
Definition: decision_tree_regression_training_types.h:89
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_tree::regression::training::data
Definition: decision_tree_regression_training_types.h:100
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:174
daal::algorithms::decision_tree::regression::training::defaultDense
Definition: decision_tree_regression_training_types.h:91
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:127
daal::algorithms::regression::training::model
Definition: regression_training_types.h:89
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:111
daal::algorithms::decision_tree::regression::training::dependentVariablesForPruning
Definition: decision_tree_regression_training_types.h:103
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_tree::regression::training::model
Definition: decision_tree_regression_training_types.h:113

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