C++ API Reference for Intel® Data Analytics Acceleration Library 2019 Update 4

decision_forest_regression_predict_types.h
1 /* file: decision_forest_regression_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2019 Intel Corporation.
4 *
5 * This software and the related documents are Intel copyrighted materials, and
6 * your use of them is governed by the express license under which they were
7 * provided to you (License). Unless the License provides otherwise, you may not
8 * use, modify, copy, publish, distribute, disclose or transmit this software or
9 * the related documents without Intel's prior written permission.
10 *
11 * This software and the related documents are provided as is, with no express
12 * or implied warranties, other than those that are expressly stated in the
13 * License.
14 *******************************************************************************/
15 
16 /*
17 //++
18 // Implementation of the decision forest algorithm interface
19 //--
20 */
21 
22 #ifndef __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
23 #define __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "data_management/data/data_serialize.h"
28 #include "services/daal_defines.h"
29 #include "algorithms/decision_forest/decision_forest_regression_model.h"
30 #include "algorithms/regression/regression_predict_types.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace decision_forest
40 {
41 namespace regression
42 {
52 namespace prediction
53 {
58 enum Method
59 {
60  defaultDense = 0
61 };
62 
67 enum NumericTableInputId
68 {
69  data = algorithms::regression::prediction::data,
70  lastNumericTableInputId = data
71 };
72 
77 enum ModelInputId
78 {
79  model = algorithms::regression::prediction::model,
80  lastModelInputId = model
81 };
82 
87 enum ResultId
88 {
89  prediction = algorithms::regression::prediction::prediction,
90  lastResultId = prediction
91 };
92 
96 namespace interface1
97 {
98 
103 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
104 {
105 public:
106  Input();
107  Input(const Input& other);
108 
114  data_management::NumericTablePtr get(NumericTableInputId id) const;
115 
121  decision_forest::regression::ModelPtr get(ModelInputId id) const;
122 
128  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
129 
135  void set(ModelInputId id, const decision_forest::regression::ModelPtr &value);
136 
141  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
142 };
143 
148 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
149 {
150 public:
151  DECLARE_SERIALIZABLE_CAST(Result)
152  Result();
153 
159  data_management::NumericTablePtr get(ResultId id) const;
160 
166  void set(ResultId id, const data_management::NumericTablePtr &value);
167 
175  template <typename algorithmFPType>
176  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
177 
185  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
186 
187 protected:
189  template<typename Archive, bool onDeserialize>
190  services::Status serialImpl(Archive *arch)
191  {
192  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
193  }
194 };
195 typedef services::SharedPtr<Result> ResultPtr;
196 typedef services::SharedPtr<const Result> ResultConstPtr;
197 
198 } // namespace interface1
199 using interface1::Input;
200 using interface1::Result;
201 using interface1::ResultPtr;
202 using interface1::ResultConstPtr;
203 
204 }
206 }
207 }
208 }
209 } // namespace daal
210 #endif
daal::algorithms::decision_forest::regression::prediction::interface1::Input
Provides an interface for input objects for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:103
daal::algorithms::decision_forest::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:77
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_forest::regression::prediction::data
Definition: decision_forest_regression_predict_types.h:69
daal::algorithms::decision_forest::regression::prediction::prediction
Definition: decision_forest_regression_predict_types.h:89
daal::algorithms::decision_forest::regression::prediction::interface1::Result
Provides interface for the result of decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:148
daal::algorithms::decision_forest::regression::prediction::ResultId
ResultId
Available identifiers of the result for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:87
daal::algorithms::decision_forest::regression::prediction::Method
Method
Available methods for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:58
daal_defines.h
daal::algorithms::decision_forest::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making decision forest model-based prediction...
Definition: decision_forest_regression_predict_types.h:67
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:72
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:52
daal::algorithms::decision_forest::regression::prediction::model
Definition: decision_forest_regression_predict_types.h:79
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:62

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