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

stump_regression_predict_types.h
1 /* file: stump_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 base classes used in the prediction stage
21 // of the regression algorithm
22 //--
23 */
24 
25 #ifndef __STUMP_REGRESSION_PREDICT_TYPES_H__
26 #define __STUMP_REGRESSION_PREDICT_TYPES_H__
27 
28 #include "algorithms/algorithm.h"
29 #include "algorithms/stump/stump_regression_model.h"
30 
31 #include "data_management/data/homogen_numeric_table.h"
32 #include "algorithms/regression/regression_predict_types.h"
33 
34 namespace daal
35 {
36 namespace algorithms
37 {
38 namespace stump
39 {
40 namespace regression
41 {
51 namespace prediction
52 {
53 
58 enum ResultId
59 {
60  prediction = algorithms::regression::prediction::prediction,
61  lastResultId = prediction
62 };
63 
67 namespace interface1
68 {
69 
74 class DAAL_EXPORT Input : public daal::algorithms::regression::prediction::Input
75 {
76  typedef daal::algorithms::regression::prediction::Input super;
77 public:
78  Input();
79  Input(const Input &other);
80 
81  virtual ~Input() {}
82 
83  using super::get;
84  using super::set;
85 
91  data_management::NumericTablePtr get(daal::algorithms::regression::prediction::NumericTableInputId id) const;
92 
98  stump::regression::ModelPtr get(daal::algorithms::regression::prediction::ModelInputId id) const;
99 
105  void set(daal::algorithms::regression::prediction::NumericTableInputId id, const data_management::NumericTablePtr &ptr);
106 
112  void set(daal::algorithms::regression::prediction::ModelInputId id, const stump::regression::ModelPtr &ptr);
113 
119  services::Status check(const daal::algorithms::Parameter *parameter, int method) const DAAL_C11_OVERRIDE;
120 };
121 
126 class DAAL_EXPORT Result : public algorithms::regression::prediction::Result
127 {
128 public:
129  DECLARE_SERIALIZABLE_CAST(Result);
130  Result();
131 
137  data_management::NumericTablePtr get(ResultId id) const;
138 
144  void set(ResultId id, const data_management::NumericTablePtr &value);
145 
152  template <typename algorithmFPType>
153  DAAL_EXPORT services::Status allocate(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, const int method);
154 
161  services::Status check(const daal::algorithms::Input *input, const daal::algorithms::Parameter *par, int method) const DAAL_C11_OVERRIDE;
162 
163 protected:
165  template<typename Archive, bool onDeserialize>
166  services::Status serialImpl(Archive *arch)
167  {
168  return daal::algorithms::Result::serialImpl<Archive, onDeserialize>(arch);
169  }
170 };
171 
172 typedef services::SharedPtr<Result> ResultPtr;
173 typedef services::SharedPtr<const Result> ResultConstPtr;
174 
175 } // namespace interface1
176 
177 using interface1::Input;
178 using interface1::Result;
179 using interface1::ResultPtr;
180 using interface1::ResultConstPtr;
181 
182 }
184 }
185 }
186 }
187 }
188 #endif
daal::algorithms::stump::regression::prediction::interface1::Input
Input objects in the prediction stage of the stump algorithm.
Definition: stump_regression_predict_types.h:74
daal::algorithms::neural_networks::prediction::prediction
Definition: neural_networks_prediction_result.h:55
daal::algorithms::regression::prediction::ModelInputId
ModelInputId
Available identifiers of input models for making the regression model-based prediction.
Definition: regression_predict_types.h:62
daal::algorithms::regression::prediction::NumericTableInputId
NumericTableInputId
Available identifiers of input numeric tables for making the regression model-based prediction...
Definition: regression_predict_types.h:52
daal::algorithms::regression::prediction::prediction
Definition: regression_predict_types.h:74
daal::algorithms::stump::regression::prediction::interface1::Result
Provides interface for the result of stump model-based prediction.
Definition: stump_regression_predict_types.h:126
daal::algorithms::math::abs::value
Definition: abs_types.h:88
daal::algorithms::stump::regression::prediction::prediction
Definition: stump_regression_predict_types.h:60
daal::algorithms::stump::regression::prediction::ResultId
ResultId
Available identifiers of the result for making decision tree model-based prediction.
Definition: stump_regression_predict_types.h:58

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