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

gbt_regression_predict_types.h
1 /* file: gbt_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 gradient boosted trees algorithm interface
21 //--
22 */
23 
24 #ifndef __GBT_REGRESSSION_PREDICT_TYPES_H__
25 #define __GBT_REGRESSSION_PREDICT_TYPES_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/numeric_table.h"
29 #include "algorithms/regression/regression_predict_types.h"
30 #include "algorithms/gradient_boosted_trees/gbt_regression_model.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
39 namespace gbt
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 
105 /* [Parameter source code] */
106 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
107 {
108  Parameter() : daal::algorithms::Parameter(), nIterations(0) {}
109  Parameter(const Parameter& o) : daal::algorithms::Parameter(o), nIterations(o.nIterations){}
110  size_t nIterations;
111 };
112 /* [Parameter source code] */
113 
118 class DAAL_EXPORT Input : public algorithms::regression::prediction::Input
119 {
120 public:
121  Input();
122  Input(const Input& other);
123 
129  data_management::NumericTablePtr get(NumericTableInputId id) const;
130 
136  gbt::regression::ModelPtr get(ModelInputId id) const;
137 
143  void set(NumericTableInputId id, const data_management::NumericTablePtr &value);
144 
150  void set(ModelInputId id, const gbt::regression::ModelPtr &value);
151 
156  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
157 };
158 
163 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
164 {
165 public:
166  DECLARE_SERIALIZABLE_CAST(Result)
167  Result();
168 
174  data_management::NumericTablePtr get(ResultId id) const;
175 
181  void set(ResultId id, const data_management::NumericTablePtr &value);
182 
190  template <typename algorithmFPType>
191  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
192 
200  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
201 
202 protected:
204  template<typename Archive, bool onDeserialize>
205  services::Status serialImpl(Archive *arch)
206  {
207  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
208  }
209 };
210 typedef services::SharedPtr<Result> ResultPtr;
211 typedef services::SharedPtr<const Result> ResultConstPtr;
212 
213 } // namespace interface1
214 using interface1::Parameter;
215 using interface1::Input;
216 using interface1::Result;
217 using interface1::ResultPtr;
218 using interface1::ResultConstPtr;
219 
220 }
222 }
223 }
224 }
225 } // namespace daal
226 #endif
daal::algorithms::gbt::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making model-based prediction.
Definition: gbt_regression_predict_types.h:67
daal::algorithms::gbt::regression::prediction::interface1::Result
Provides interface for the result of model-based prediction.
Definition: gbt_regression_predict_types.h:163
daal::algorithms::gbt::regression::prediction::prediction
Definition: gbt_regression_predict_types.h:89
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::gbt::regression::prediction::ResultId
ResultId
Available identifiers of the result for making model-based prediction.
Definition: gbt_regression_predict_types.h:87
daal::algorithms::gbt::regression::prediction::interface1::Parameter::nIterations
size_t nIterations
Definition: gbt_regression_predict_types.h:110
daal::algorithms::regression::prediction::data
Definition: regression_predict_types.h:54
daal::algorithms::gbt::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making model-based prediction.
Definition: gbt_regression_predict_types.h:77
daal::algorithms::gbt::regression::prediction::defaultDense
Definition: gbt_regression_predict_types.h:60
daal::algorithms::gbt::regression::prediction::interface1::Parameter
Parameters of the prediction algorithm.
Definition: gbt_regression_predict_types.h:106
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::gbt::regression::prediction::Method
Method
Available methods for making model-based prediction.
Definition: gbt_regression_predict_types.h:58
daal::algorithms::gbt::regression::prediction::data
Definition: gbt_regression_predict_types.h:69
daal::algorithms::regression::prediction::model
Definition: regression_predict_types.h:64
daal::algorithms::gbt::regression::prediction::model
Definition: gbt_regression_predict_types.h:79
daal::algorithms::gbt::regression::prediction::interface1::Input
Provides an interface for input objects for making model-based prediction.
Definition: gbt_regression_predict_types.h:118
daal::algorithms::em_gmm::nIterations
Definition: em_gmm_types.h:99

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