22 #ifndef __DECISION_TREE_CLASSIFICATION_MODEL_H__
23 #define __DECISION_TREE_CLASSIFICATION_MODEL_H__
25 #include "algorithms/classifier/classifier_model.h"
26 #include "algorithms/classifier/tree_traverse.h"
27 #include "data_management/data/aos_numeric_table.h"
28 #include "data_management/data/soa_numeric_table.h"
29 #include "data_management/data/homogen_numeric_table.h"
30 #include "decision_tree_model.h"
31 #include "algorithms/tree_utils/tree_utils_classification.h"
47 namespace decision_tree
53 namespace classification
82 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
88 Parameter(
size_t nClasses = 2) : daal::algorithms::classifier::Parameter(nClasses),
89 pruning(reducedErrorPruning), maxTreeDepth(0), minObservationsInLeafNodes(1),
90 splitCriterion(infoGain) {}
95 services::Status check() const DAAL_C11_OVERRIDE;
97 SplitCriterion splitCriterion;
100 size_t minObservationsInLeafNodes;
113 class DAAL_EXPORT Model : public daal::algorithms::classifier::Model
116 DECLARE_MODEL_IFACE(Model, classifier::Model);
123 Model(
size_t nFeatures = 0);
130 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
135 typedef services::SharedPtr<ModelImpl> ModelImplPtr;
141 const ModelImpl * impl()
const {
return _impl.get(); }
147 ModelImpl * impl() {
return _impl.get(); }
153 size_t getNumberOfFeatures() const DAAL_C11_OVERRIDE;
160 void traverseDF(classifier::TreeNodeVisitor& visitor) const;
167 void traverseBF(classifier::TreeNodeVisitor& visitor) const;
173 void traverseDFS(tree_utils::classification::TreeNodeVisitor& visitor) const;
179 void traverseBFS(tree_utils::classification::TreeNodeVisitor& visitor) const;
182 Model(
size_t nFeatures, services::Status &st);
184 services::Status serializeImpl(data_management::InputDataArchive * arch) DAAL_C11_OVERRIDE;
186 services::Status deserializeImpl(const data_management::OutputDataArchive * arch) DAAL_C11_OVERRIDE;
192 typedef services::SharedPtr<Model> ModelPtr;
193 typedef services::SharedPtr<const Model> ModelConstPtr;
197 using interface1::Parameter;
198 using interface1::Model;
199 using interface1::ModelPtr;
200 using interface1::ModelConstPtr;
daal
Definition: algorithm_base_common.h:31
daal::algorithms::decision_tree::reducedErrorPruning
Definition: decision_tree_model.h:50
daal::algorithms::decision_tree::classification::SplitCriterion
SplitCriterion
Split criterion for Decision tree classification algorithm.
Definition: decision_tree_classification_model.h:60
daal::algorithms::decision_tree::classification::interface1::Model
Base class for models trained with the Decision tree algorithm
Definition: decision_tree_classification_model.h:113
daal::algorithms::decision_tree::Pruning
Pruning
Pruning method for Decision tree algorithm.
Definition: decision_tree_model.h:47
daal::algorithms::decision_tree::classification::infoGain
Definition: decision_tree_classification_model.h:63
daal::algorithms::decision_tree::classification::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:82
daal::algorithms::decision_tree::classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: decision_tree_classification_model.h:141
daal::algorithms::decision_tree::classification::gini
Definition: decision_tree_classification_model.h:62
daal::algorithms::decision_tree::classification::interface1::Model::impl
ModelImpl * impl()
Definition: decision_tree_classification_model.h:147
daal::algorithms::decision_tree::classification::interface1::Parameter::Parameter
Parameter(size_t nClasses=2)
Definition: decision_tree_classification_model.h:88