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

decision_forest_regression_predict_types.h
1 /* file: decision_forest_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 forest algorithm interface
21 //--
22 */
23 
24 #ifndef __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
25 #define __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "data_management/data/data_serialize.h"
30 #include "services/daal_defines.h"
31 #include "algorithms/decision_forest/decision_forest_regression_model.h"
32 #include "algorithms/regression/regression_predict_types.h"
33 
34 namespace daal
35 {
36 namespace algorithms
37 {
41 namespace decision_forest
42 {
43 namespace regression
44 {
54 namespace prediction
55 {
60 enum Method
61 {
62  defaultDense = 0
63 };
64 
69 enum NumericTableInputId
70 {
71  data = algorithms::regression::prediction::data,
72  lastNumericTableInputId = data
73 };
74 
79 enum ModelInputId
80 {
81  model = algorithms::regression::prediction::model,
82  lastModelInputId = model
83 };
84 
89 enum ResultId
90 {
91  prediction = algorithms::regression::prediction::prediction,
92  lastResultId = prediction
93 };
94 
98 namespace interface1
99 {
100 
105 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
106 {
107 public:
108  Input();
109  Input(const Input& other);
110 
116  data_management::NumericTablePtr get(NumericTableInputId id) const;
117 
123  decision_forest::regression::ModelPtr get(ModelInputId id) const;
124 
130  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
131 
137  void set(ModelInputId id, const decision_forest::regression::ModelPtr &value);
138 
143  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
144 };
145 
150 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
151 {
152 public:
153  DECLARE_SERIALIZABLE_CAST(Result)
154  Result();
155 
161  data_management::NumericTablePtr get(ResultId id) const;
162 
168  void set(ResultId id, const data_management::NumericTablePtr &value);
169 
177  template <typename algorithmFPType>
178  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
179 
187  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
188 
189 protected:
191  template<typename Archive, bool onDeserialize>
192  services::Status serialImpl(Archive *arch)
193  {
194  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
195  }
196 };
197 typedef services::SharedPtr<Result> ResultPtr;
198 typedef services::SharedPtr<const Result> ResultConstPtr;
199 
200 } // namespace interface1
201 using interface1::Input;
202 using interface1::Result;
203 using interface1::ResultPtr;
204 using interface1::ResultConstPtr;
205 
206 }
208 }
209 }
210 }
211 } // namespace daal
212 #endif
daal::algorithms::decision_forest::regression::prediction::data
Definition: decision_forest_regression_predict_types.h:71
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:54
daal_defines.h
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:79
daal::algorithms::decision_forest::regression::prediction::Method
Method
Available methods for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:60
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:89
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::decision_forest::regression::prediction::prediction
Definition: decision_forest_regression_predict_types.h:91
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:69
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:150
daal::algorithms::math::abs::value
Definition: abs_types.h:88
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:105
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:64
daal::algorithms::decision_forest::regression::prediction::model
Definition: decision_forest_regression_predict_types.h:81

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