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

gbt_regression_predict_types.h
1 /* file: gbt_regression_predict_types.h */
2 /*******************************************************************************
3 * Copyright 2014-2018 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 gradient boosted trees algorithm interface
19 //--
20 */
21 
22 #ifndef __GBT_REGRESSSION_PREDICT_TYPES_H__
23 #define __GBT_REGRESSSION_PREDICT_TYPES_H__
24 
25 #include "algorithms/algorithm.h"
26 #include "data_management/data/numeric_table.h"
27 #include "algorithms/regression/regression_predict_types.h"
28 #include "algorithms/gradient_boosted_trees/gbt_regression_model.h"
29 
30 namespace daal
31 {
32 namespace algorithms
33 {
37 namespace gbt
38 {
39 namespace regression
40 {
50 namespace prediction
51 {
56 enum Method
57 {
58  defaultDense = 0
59 };
60 
65 enum NumericTableInputId
66 {
67  data = algorithms::regression::prediction::data,
68  lastNumericTableInputId = data
69 };
70 
75 enum ModelInputId
76 {
77  model = algorithms::regression::prediction::model,
78  lastModelInputId = model
79 };
80 
85 enum ResultId
86 {
87  prediction = algorithms::regression::prediction::prediction,
88  lastResultId = prediction
89 };
90 
94 namespace interface1
95 {
96 
103 /* [Parameter source code] */
104 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
105 {
106  Parameter() : daal::algorithms::Parameter(), nIterations(0) {}
107  Parameter(const Parameter& o) : daal::algorithms::Parameter(o), nIterations(o.nIterations){}
108  size_t nIterations;
109 };
110 /* [Parameter source code] */
111 
116 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
117 {
118 public:
119  Input();
120  Input(const Input& other);
121 
127  data_management::NumericTablePtr get(NumericTableInputId id) const;
128 
134  gbt::regression::ModelPtr get(ModelInputId id) const;
135 
141  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
142 
148  void set(ModelInputId id, const gbt::regression::ModelPtr &value);
149 
154  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
155 };
156 
161 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
162 {
163 public:
164  DECLARE_SERIALIZABLE_CAST(Result)
165  Result();
166 
172  data_management::NumericTablePtr get(ResultId id) const;
173 
179  void set(ResultId id, const data_management::NumericTablePtr &value);
180 
188  template <typename algorithmFPType>
189  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
190 
198  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
199 
200 protected:
202  template<typename Archive, bool onDeserialize>
203  services::Status serialImpl(Archive *arch)
204  {
205  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
206  }
207 };
208 typedef services::SharedPtr<Result> ResultPtr;
209 typedef services::SharedPtr<const Result> ResultConstPtr;
210 
211 } // namespace interface1
212 using interface1::Parameter;
213 using interface1::Input;
214 using interface1::Result;
215 using interface1::ResultPtr;
216 using interface1::ResultConstPtr;
217 
218 }
220 }
221 }
222 }
223 } // namespace daal
224 #endif
daal
Definition: algorithm_base_common.h:31
daal::algorithms::gbt::regression::prediction::interface1::Result
Provides interface for the result of model-based prediction.
Definition: gbt_regression_predict_types.h:161
daal::algorithms::gbt::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making model-based prediction.
Definition: gbt_regression_predict_types.h:75
daal::algorithms::gbt::regression::prediction::Method
Method
Available methods for making model-based prediction.
Definition: gbt_regression_predict_types.h:56
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:97
daal::algorithms::gbt::regression::prediction::data
Definition: gbt_regression_predict_types.h:67
daal::algorithms::gbt::regression::prediction::interface1::Input
Provides an interface for input objects for making model-based prediction.
Definition: gbt_regression_predict_types.h:116
daal::algorithms::gbt::regression::prediction::interface1::Parameter::nIterations
size_t nIterations
Definition: gbt_regression_predict_types.h:108
daal::algorithms::gbt::regression::prediction::prediction
Definition: gbt_regression_predict_types.h:87
daal::algorithms::gbt::regression::prediction::model
Definition: gbt_regression_predict_types.h:77
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:72
daal::algorithms::gbt::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making model-based prediction.
Definition: gbt_regression_predict_types.h:65
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:52
daal::algorithms::math::abs::value
Definition: abs_types.h:86
daal::algorithms::gbt::regression::prediction::ResultId
ResultId
Available identifiers of the result for making model-based prediction.
Definition: gbt_regression_predict_types.h:85
daal::algorithms::gbt::regression::prediction::interface1::Parameter
Parameters of the prediction algorithm.
Definition: gbt_regression_predict_types.h:104
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:62
daal::algorithms::gbt::regression::prediction::defaultDense
Definition: gbt_regression_predict_types.h:58

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