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

gbt_regression_model.h
1 /* file: gbt_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 gradient boosted trees regression model
21 //--
22 */
23 
24 #ifndef __GBT_REGRESSION_MODEL_H__
25 #define __GBT_REGRESSION_MODEL_H__
26 
27 #include "algorithms/regression/regression_model.h"
28 #include "algorithms/regression/tree_traverse.h"
29 #include "algorithms/tree_utils/tree_utils_regression.h"
30 
31 namespace daal
32 {
33 namespace algorithms
34 {
35 namespace gbt
36 {
45 namespace regression
46 {
50 namespace interface1
51 {
52 
67 class DAAL_EXPORT Model : public algorithms::regression::Model
68 {
69 public:
70  DECLARE_MODEL(Model, algorithms::regression::Model);
71 
77  static services::SharedPtr<Model> create(size_t nFeatures, services::Status *stat = NULL);
78 
84  virtual size_t numberOfTrees() const = 0;
85 
92  virtual void traverseDF(size_t iTree, algorithms::regression::TreeNodeVisitor& visitor) const = 0;
93 
100  virtual void traverseBF(size_t iTree, algorithms::regression::TreeNodeVisitor& visitor) const = 0;
101 
105  virtual void clear() = 0;
106 
112  virtual void traverseDFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
113 
119  virtual void traverseBFS(size_t iTree, tree_utils::regression::TreeNodeVisitor& visitor) const = 0;
120 
125  virtual size_t getNumberOfTrees() const = 0;
126 
127 protected:
128  Model();
129 };
130 typedef services::SharedPtr<Model> ModelPtr;
131 typedef services::SharedPtr<const Model> ModelConstPtr;
132 
134 } // namespace interface1
135 using interface1::Model;
136 using interface1::ModelPtr;
137 using interface1::ModelConstPtr;
138 
139 }
140 }
141 }
142 }
143 #endif
daal::algorithms::gbt::regression::interface1::Model
Base class for models trained with the gradient boosted trees regression algorithm ...
Definition: gbt_regression_model.h:67

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