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

decision_tree_regression_predict_types.h
1 /* file: decision_tree_regression_predict_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 regression algorithm interface
45 //--
46 */
47 
48 #ifndef __DECISION_TREE_REGRESSION_PREDICT_TYPES_H__
49 #define __DECISION_TREE_REGRESSION_PREDICT_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_predict_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 prediction
83 {
84 
89 enum Method
90 {
91  defaultDense = 0
92 };
93 
98 enum NumericTableInputId
99 {
100  data = algorithms::regression::prediction::data,
101  lastNumericTableInputId = data
102 };
103 
108 enum ModelInputId
109 {
110  model = algorithms::regression::prediction::model,
111  lastModelInputId = model
112 };
113 
118 enum ResultId
119 {
120  prediction = algorithms::regression::prediction::prediction,
121  lastResultId = prediction
122 };
123 
127 namespace interface1
128 {
129 
134 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
135 {
136 public:
137  Input();
138  Input(const Input &other);
139 
145  data_management::NumericTablePtr get(NumericTableInputId id) const;
146 
152  ModelPtr get(ModelInputId id) const;
153 
159  void set(NumericTableInputId id, const data_management::NumericTablePtr & ptr);
160 
166  void set(ModelInputId id, const ModelPtr & value);
167 
173  services::Status check(const daal::algorithms::Parameter * parameter, int method) const DAAL_C11_OVERRIDE;
174 };
175 
180 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
181 {
182 public:
183  DECLARE_SERIALIZABLE_CAST(Result);
184  Result();
185 
191  data_management::NumericTablePtr get(ResultId id) const;
192 
198  void set(ResultId id, const data_management::NumericTablePtr &value);
199 
206  template <typename algorithmFPType>
207  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, const int method);
208 
215  services::Status check(const daal::algorithms::Input * input, const daal::algorithms::Parameter * par, int method) const DAAL_C11_OVERRIDE;
216 
217 protected:
219  template<typename Archive, bool onDeserialize>
220  services::Status serialImpl(Archive *arch)
221  {
222  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
223  }
224 };
225 
226 typedef services::SharedPtr<Result> ResultPtr;
227 typedef services::SharedPtr<const Result> ResultConstPtr;
228 
229 } // namespace interface1
230 
231 using interface1::Input;
232 using interface1::Result;
233 using interface1::ResultPtr;
234 using interface1::ResultConstPtr;
235 
236 } // namespace prediction
238 } // namespace regression
239 } // namespace decision_tree
240 } // namespace algorithms
241 } // namespace daal
242 
243 #endif
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:108
daal::algorithms::decision_tree::regression::prediction::prediction
Definition: decision_tree_regression_predict_types.h:120
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:98
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_tree::regression::prediction::data
Definition: decision_tree_regression_predict_types.h:100
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:134
daal::algorithms::decision_tree::regression::prediction::defaultDense
Definition: decision_tree_regression_predict_types.h:91
daal::algorithms::decision_tree::regression::prediction::model
Definition: decision_tree_regression_predict_types.h:110
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:98
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:78
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:118
daal::algorithms::decision_tree::regression::prediction::Method
Method
Available methods for making Decision tree model-based prediction.
Definition: decision_tree_regression_predict_types.h:89
daal::algorithms::math::abs::value
Definition: abs_types.h:112
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:180
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:88

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