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

stump_regression_model.h
1 /* file: stump_regression_model.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 class defining the decision stump model.
21 //--
22 */
23 
24 #ifndef __STUMP_REGRESSION_MODEL_H__
25 #define __STUMP_REGRESSION_MODEL_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "data_management/data/matrix.h"
30 #include "algorithms/regression/regression_model.h"
31 #include "algorithms/decision_tree/decision_tree_regression_model.h"
32 
33 namespace daal
34 {
35 namespace algorithms
36 {
43 namespace stump
44 {
45 namespace regression
46 {
51 enum VariableImportanceMode
52 {
53  none, /* Do not compute */
54  MDI,
55  MDA_Raw,
56  MDA_Scaled
57 };
58 
62 namespace interface1
63 {
64 
65 // CLARIFICATION:: Added parameter class to support different split criterions for stump.
72 /* [Parameter source code] */
73 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
74 {
78  Parameter() : daal::algorithms::Parameter(), varImportance(none) {}
79 
83  services::Status check() const DAAL_C11_OVERRIDE;
84 
85  VariableImportanceMode varImportance;
87 };
88 /* [Parameter source code] */
89 
98 class DAAL_EXPORT Model : public daal::algorithms::decision_tree::regression::Model
99 {
100 public:
101  DECLARE_MODEL_IFACE(Model, decision_tree::regression::Model);
102 
109  static services::SharedPtr<Model> create(services::Status *stat = NULL);
110 
114  Model() {}
115 
116  virtual ~Model();
117 
122  size_t getSplitFeature() const;
123 
128  template<typename modelFPType>
129  DAAL_EXPORT modelFPType getSplitValue();
130 
135  template<typename modelFPType>
136  DAAL_EXPORT modelFPType getLeftValue();
137 
142  template<typename modelFPType>
143  DAAL_EXPORT modelFPType getRightValue();
144 
145 protected:
146  Model(services::Status &st);
147 
148  services::Status serializeImpl(data_management::InputDataArchive * arch) DAAL_C11_OVERRIDE;
149 
150  services::Status deserializeImpl(const data_management::OutputDataArchive * arch) DAAL_C11_OVERRIDE;
151 
152 };
153 
154 typedef services::SharedPtr<Model> ModelPtr;
155 typedef services::SharedPtr<const Model> ModelConstPtr;
156 
157 } // namespace interface1
158 
159 using interface1::Parameter;
160 using interface1::Model;
161 using interface1::ModelPtr;
162 using interface1::ModelConstPtr;
163 
164 }
166 }
167 }
168 } // namespace daal
169 #endif
daal::algorithms::stump::regression::interface1::Model::Model
Model()
Definition: stump_regression_model.h:114
daal::algorithms::decision_forest::training::VariableImportanceMode
VariableImportanceMode
Variable importance computation mode.
Definition: decision_forest_training_parameter.h:60
daal::algorithms::stump::regression::interface1::Parameter::Parameter
Parameter()
Definition: stump_regression_model.h:78
daal::algorithms::interface1::Parameter
Base class to represent computation parameters. Algorithm-specific parameters are represented as deri...
Definition: algorithm_types.h:62
daal::algorithms::stump::regression::interface1::Parameter
Stump algorithm parameters.
Definition: stump_regression_model.h:73
daal::algorithms::stump::interface1::Model
Model of the classifier trained by the stump::training::Batch algorithm.
Definition: stump_model.h:58
daal::algorithms::stump::regression::interface1::Model
Model of the regression trained by the stump::regression::training::Batch algorithm.
Definition: stump_regression_model.h:98

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