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

decision_forest_classification_model.h
1 /* file: decision_forest_classification_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 class defining decision_forest classification model.
21 //--
22 */
23 
24 #ifndef __DECISION_FOREST_CLASSIFICATION_MODEL_H__
25 #define __DECISION_FOREST_CLASSIFICATION_MODEL_H__
26 
27 #include "algorithms/algorithm.h"
28 #include "algorithms/classifier/classifier_model.h"
29 #include "algorithms/classifier/tree_traverse.h"
30 #include "algorithms/tree_utils/tree_utils_classification.h"
31 
32 namespace daal
33 {
34 namespace algorithms
35 {
36 namespace decision_forest
37 {
46 namespace classification
47 {
51 namespace interface1
52 {
65 class DAAL_EXPORT Model : public classifier::Model
66 {
67 public:
68  DECLARE_MODEL(Model, classifier::Model)
69 
70 
75  virtual size_t numberOfTrees() const = 0;
76 
83  virtual void traverseDF(size_t iTree, classifier::TreeNodeVisitor& visitor) const = 0;
84 
91  virtual void traverseBF(size_t iTree, classifier::TreeNodeVisitor& visitor) const = 0;
92 
96  virtual void clear() = 0;
97 
103  virtual void traverseDFS(size_t iTree, tree_utils::classification::interface1::TreeNodeVisitor& visitor) const = 0;
104 
110  virtual void traverseBFS(size_t iTree, tree_utils::classification::interface1::TreeNodeVisitor& visitor) const = 0;
111 
116  virtual size_t getNumberOfTrees() const = 0;
117 
122  virtual size_t getNumberOfClasses() const = 0;
123 
129  virtual void traverseDFS(size_t iTree, tree_utils::classification::TreeNodeVisitor& visitor) const = 0;
130 
136  virtual void traverseBFS(size_t iTree, tree_utils::classification::TreeNodeVisitor& visitor) const = 0;
137 
138 protected:
139  Model() : classifier::Model()
140  {}
141 };
143 typedef services::SharedPtr<Model> ModelPtr;
144 } // namespace interface1
145 using interface1::Model;
146 using interface1::ModelPtr;
147 
148 } // namespace classification
149 } // namespace decision_forest
150 } // namespace algorithms
151 } // namespace daal
152 #endif
daal::algorithms::decision_forest::classification::interface1::Model
Model of the classifier trained by the decision_forest::training::Batch algorithm.
Definition: decision_forest_classification_model.h:65

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