24 #ifndef __DECISION_TREE_CLASSIFICATION_MODEL_H__
25 #define __DECISION_TREE_CLASSIFICATION_MODEL_H__
27 #include "algorithms/classifier/classifier_model.h"
28 #include "algorithms/classifier/tree_traverse.h"
29 #include "data_management/data/aos_numeric_table.h"
30 #include "data_management/data/soa_numeric_table.h"
31 #include "data_management/data/homogen_numeric_table.h"
32 #include "decision_tree_model.h"
33 #include "algorithms/tree_utils/tree_utils_classification.h"
49 namespace decision_tree
55 namespace classification
84 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::interface1::Parameter
90 DAAL_DEPRECATED Parameter(
size_t nClasses = 2) : daal::algorithms::classifier::interface1::Parameter(nClasses),
91 pruning(reducedErrorPruning), maxTreeDepth(0), minObservationsInLeafNodes(1),
92 splitCriterion(infoGain) {}
97 DAAL_DEPRECATED services::Status check() const DAAL_C11_OVERRIDE;
99 SplitCriterion splitCriterion;
102 size_t minObservationsInLeafNodes;
115 class DAAL_EXPORT Model : public daal::algorithms::classifier::Model
118 DECLARE_MODEL_IFACE(Model, classifier::Model);
125 Model(
size_t nFeatures = 0);
132 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
137 typedef services::SharedPtr<ModelImpl> ModelImplPtr;
143 const ModelImpl * impl()
const {
return _impl.get(); }
149 ModelImpl * impl() {
return _impl.get(); }
155 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE;
162 void traverseDF(classifier::TreeNodeVisitor& visitor) const;
169 void traverseBF(classifier::TreeNodeVisitor& visitor) const;
175 void traverseDFS(tree_utils::classification::interface1::TreeNodeVisitor& visitor) const;
181 void traverseBFS(tree_utils::classification::interface1::TreeNodeVisitor& visitor) const;
187 void traverseDFS(tree_utils::classification::TreeNodeVisitor& visitor) const;
193 void traverseBFS(tree_utils::classification::TreeNodeVisitor& visitor) const;
196 Model(
size_t nFeatures, services::Status &st);
198 services::Status serializeImpl(data_management::InputDataArchive * arch) DAAL_C11_OVERRIDE;
200 services::Status deserializeImpl(const data_management::OutputDataArchive * arch) DAAL_C11_OVERRIDE;
206 typedef services::SharedPtr<Model> ModelPtr;
207 typedef services::SharedPtr<const Model> ModelConstPtr;
211 using interface1::Model;
212 using interface1::ModelPtr;
213 using interface1::ModelConstPtr;
231 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
237 Parameter(
size_t nClasses = 2) : daal::algorithms::classifier::Parameter(nClasses),
238 pruning(reducedErrorPruning), maxTreeDepth(0), minObservationsInLeafNodes(1),
240 splitCriterion(infoGain) {}
245 services::Status check() const DAAL_C11_OVERRIDE;
247 SplitCriterion splitCriterion;
250 size_t minObservationsInLeafNodes;
256 using interface2::Parameter;
daal::algorithms::decision_tree::classification::SplitCriterion
SplitCriterion
Split criterion for Decision tree classification algorithm.
Definition: decision_tree_classification_model.h:62
daal::algorithms::decision_tree::reducedErrorPruning
Definition: decision_tree_model.h:52
daal::algorithms::decision_tree::classification::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:84
daal::algorithms::decision_tree::classification::interface2::Parameter::Parameter
Parameter(size_t nClasses=2)
Definition: decision_tree_classification_model.h:237
daal::algorithms::decision_tree::classification::interface2::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:231
daal::algorithms::decision_tree::Pruning
Pruning
Pruning method for Decision tree algorithm.
Definition: decision_tree_model.h:49
daal::algorithms::decision_tree::classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: decision_tree_classification_model.h:143
daal::algorithms::decision_tree::classification::interface1::Parameter::Parameter
DAAL_DEPRECATED Parameter(size_t nClasses=2)
Definition: decision_tree_classification_model.h:90
daal::algorithms::decision_tree::classification::interface1::Model
Base class for models trained with the Decision tree algorithm
Definition: decision_tree_classification_model.h:115
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:69
daal::algorithms::decision_tree::classification::interface1::Model::impl
ModelImpl * impl()
Definition: decision_tree_classification_model.h:149
daal::algorithms::decision_tree::classification::gini
Definition: decision_tree_classification_model.h:64
daal::algorithms::decision_tree::classification::infoGain
Definition: decision_tree_classification_model.h:65