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

decision_forest_regression_predict_types.h
1 /* file: decision_forest_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 forest algorithm interface
45 //--
46 */
47 
48 #ifndef __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
49 #define __DECISION_FOREST_REGRESSSION_PREDICT_TYPES_H__
50 
51 #include "algorithms/algorithm.h"
52 #include "data_management/data/numeric_table.h"
53 #include "data_management/data/data_serialize.h"
54 #include "services/daal_defines.h"
55 #include "algorithms/decision_forest/decision_forest_regression_model.h"
56 #include "algorithms/regression/regression_predict_types.h"
57 
58 namespace daal
59 {
60 namespace algorithms
61 {
65 namespace decision_forest
66 {
67 namespace regression
68 {
78 namespace prediction
79 {
84 enum Method
85 {
86  defaultDense = 0
87 };
88 
93 enum NumericTableInputId
94 {
95  data = algorithms::regression::prediction::data,
96  lastNumericTableInputId = data
97 };
98 
103 enum ModelInputId
104 {
105  model = algorithms::regression::prediction::model,
106  lastModelInputId = model
107 };
108 
113 enum ResultId
114 {
115  prediction = algorithms::regression::prediction::prediction,
116  lastResultId = prediction
117 };
118 
122 namespace interface1
123 {
124 
129 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
130 {
131 public:
132  Input();
133  Input(const Input& other);
134 
140  data_management::NumericTablePtr get(NumericTableInputId id) const;
141 
147  decision_forest::regression::ModelPtr get(ModelInputId id) const;
148 
154  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
155 
161  void set(ModelInputId id, const decision_forest::regression::ModelPtr &value);
162 
167  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
168 };
169 
174 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
175 {
176 public:
177  DECLARE_SERIALIZABLE_CAST(Result)
178  Result();
179 
185  data_management::NumericTablePtr get(ResultId id) const;
186 
192  void set(ResultId id, const data_management::NumericTablePtr &value);
193 
201  template <typename algorithmFPType>
202  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
203 
211  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
212 
213 protected:
215  template<typename Archive, bool onDeserialize>
216  services::Status serialImpl(Archive *arch)
217  {
218  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
219  }
220 };
221 typedef services::SharedPtr<Result> ResultPtr;
222 typedef services::SharedPtr<const Result> ResultConstPtr;
223 
224 } // namespace interface1
225 using interface1::Input;
226 using interface1::Result;
227 using interface1::ResultPtr;
228 using interface1::ResultConstPtr;
229 
230 }
232 }
233 }
234 }
235 } // namespace daal
236 #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:129
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:103
daal
Definition: algorithm_base_common.h:57
daal::algorithms::decision_forest::regression::prediction::data
Definition: decision_forest_regression_predict_types.h:95
daal::algorithms::decision_forest::regression::prediction::prediction
Definition: decision_forest_regression_predict_types.h:115
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:174
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:113
daal::algorithms::decision_forest::regression::prediction::Method
Method
Available methods for making decision forest model-based prediction.
Definition: decision_forest_regression_predict_types.h:84
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:93
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_forest::regression::prediction::model
Definition: decision_forest_regression_predict_types.h:105
daal::algorithms::math::abs::value
Definition: abs_types.h:112
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:88

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