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

decision_tree_regression_predict_types.h
1 /* file: decision_tree_regression_predict_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 regression algorithm interface
21 //--
22 */
23 
24 #ifndef __DECISION_TREE_REGRESSION_PREDICT_TYPES_H__
25 #define __DECISION_TREE_REGRESSION_PREDICT_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_predict_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 prediction
59 {
60 
65 enum Method
66 {
67  defaultDense = 0
68 };
69 
74 enum NumericTableInputId
75 {
76  data = algorithms::regression::prediction::data,
77  lastNumericTableInputId = data
78 };
79 
84 enum ModelInputId
85 {
86  model = algorithms::regression::prediction::model,
87  lastModelInputId = model
88 };
89 
94 enum ResultId
95 {
96  prediction = algorithms::regression::prediction::prediction,
97  lastResultId = prediction
98 };
99 
103 namespace interface1
104 {
105 
110 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
111 {
112 public:
113  Input();
114  Input(const Input &other);
115 
121  data_management::NumericTablePtr get(NumericTableInputId id) const;
122 
128  ModelPtr get(ModelInputId id) const;
129 
135  void set(NumericTableInputId id, const data_management::NumericTablePtr & ptr);
136 
142  void set(ModelInputId id, const ModelPtr & value);
143 
149  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
150 };
151 
156 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
157 {
158 public:
159  DECLARE_SERIALIZABLE_CAST(Result);
160  Result();
161 
167  data_management::NumericTablePtr get(ResultId id) const;
168 
174  void set(ResultId id, const data_management::NumericTablePtr &value);
175 
182  template <typename algorithmFPType>
183  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method);
184 
191  services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE;
192 
193 protected:
195  template<typename Archive, bool onDeserialize>
196  services::Status serialImpl(Archive *arch)
197  {
198  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
199  }
200 };
201 
202 typedef services::SharedPtr<Result> ResultPtr;
203 typedef services::SharedPtr<const Result> ResultConstPtr;
204 
205 } // namespace interface1
206 
207 using interface1::Input;
208 using interface1::Result;
209 using interface1::ResultPtr;
210 using interface1::ResultConstPtr;
211 
212 } // namespace prediction
214 } // namespace regression
215 } // namespace decision_tree
216 } // namespace algorithms
217 } // namespace daal
218 
219 #endif
daal::algorithms::decision_tree::regression::prediction::interface1::Result
Provides interface for the result of decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:156
daal::algorithms::decision_tree::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making decision tree model-based prediction...
Definition: decision_tree_regression_predict_types.h:74
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::decision_tree::regression::prediction::model
Definition: decision_tree_regression_predict_types.h:86
daal::algorithms::decision_tree::regression::prediction::Method
Method
Available methods for making Decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:65
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:54
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::decision_tree::regression::prediction::interface1::Input
Provides an interface for input objects for making Decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:110
daal::algorithms::decision_tree::regression::prediction::data
Definition: decision_tree_regression_predict_types.h:76
daal::algorithms::decision_tree::regression::prediction::ResultId
ResultId
Available identifiers of the result for making decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:94
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::decision_tree::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:84
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:96
daal::algorithms::decision_tree::regression::prediction::defaultDense
Definition: decision_tree_regression_predict_types.h:67
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:64

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