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

decision_tree_regression_model.h
1 /* file: decision_tree_regression_model.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 class defining the Decision tree regression model
19 //--
20 */
21 
22 #ifndef __DECISION_TREE_REGRESSION_MODEL_H__
23 #define __DECISION_TREE_REGRESSION_MODEL_H__
24 
25 #include "data_management/data/numeric_table.h"
26 #include "data_management/data/aos_numeric_table.h"
27 #include "data_management/data/soa_numeric_table.h"
28 #include "data_management/data/homogen_numeric_table.h"
29 #include "algorithms/model.h"
30 #include "decision_tree_model.h"
31 #include "algorithms/regression/regression_model.h"
32 #include "algorithms/regression/tree_traverse.h"
33 
34 namespace daal
35 {
36 namespace algorithms
37 {
41 namespace decision_tree
42 {
51 namespace regression
52 {
53 
57 namespace interface1
58 {
69 /* [Parameter source code] */
70 struct DAAL_EXPORT Parameter : public daal::algorithms::Parameter
71 {
75  Parameter() : daal::algorithms::Parameter(),
76  pruning(reducedErrorPruning), maxTreeDepth(0), minObservationsInLeafNodes(5)
77  {}
78 
82  services::Status check() const DAAL_C11_OVERRIDE;
83 
84  Pruning pruning;
85  size_t maxTreeDepth;
86  size_t minObservationsInLeafNodes;
87 };
88 /* [Parameter source code] */
89 
99 class DAAL_EXPORT Model : public algorithms::regression::Model
100 {
101 public:
102  DECLARE_MODEL_IFACE(Model, algorithms::regression::Model);
103 
108  Model();
109 
110  virtual ~Model();
111 
112  class ModelImpl;
113  typedef services::SharedPtr<ModelImpl> ModelImplPtr;
114 
119  const ModelImpl * impl() const { return _impl.get(); }
120 
125  ModelImpl * impl() { return _impl.get(); }
126 
131  static services::SharedPtr<Model> create(services::Status *stat = NULL);
132 
136  virtual size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE;
137 
142  void traverseDF(algorithms::regression::TreeNodeVisitor& visitor) const;
143 
148  void traverseBF(algorithms::regression::TreeNodeVisitor& visitor) const;
149 
150 protected:
151  Model(services::Status &st);
152 
153  services::Status serializeImpl(data_management::InputDataArchive * arch) DAAL_C11_OVERRIDE;
154 
155  services::Status deserializeImpl(const data_management::OutputDataArchive * arch) DAAL_C11_OVERRIDE;
156 
157 private:
158  ModelImplPtr _impl;
159 };
160 
161 typedef services::SharedPtr<Model> ModelPtr;
162 typedef services::SharedPtr<const Model> ModelConstPtr;
163 
164 } // namespace interface1
165 
166 using interface1::Parameter;
167 using interface1::Model;
168 using interface1::ModelPtr;
169 using interface1::ModelConstPtr;
170 
172 } // namespace regression
173 } // namespace decision_tree
174 } // namespace algorithms
175 } // namespace daal
176 
177 #endif
daal::algorithms::decision_tree::regression::interface1::Parameter::Parameter
Parameter()
Definition: decision_tree_regression_model.h:75
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::reducedErrorPruning
Definition: decision_tree_model.h:50
daal::algorithms::decision_tree::regression::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_regression_model.h:70
daal::algorithms::decision_tree::regression::interface1::Model::impl
const ModelImpl * impl() const
Definition: decision_tree_regression_model.h:119
daal::algorithms::decision_tree::Pruning
Pruning
Pruning method for Decision tree algorithm.
Definition: decision_tree_model.h:47
daal::algorithms::decision_tree::regression::interface1::Model
Base class for models trained with the Decision tree algorithm
Definition: decision_tree_regression_model.h:99
daal::algorithms::decision_tree::regression::interface1::Model::impl
ModelImpl * impl()
Definition: decision_tree_regression_model.h:125

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