48 #ifndef __DECISION_TREE_CLASSIFICATION_MODEL_H__ 49 #define __DECISION_TREE_CLASSIFICATION_MODEL_H__ 51 #include "algorithms/classifier/classifier_model.h" 52 #include "algorithms/classifier/tree_traverse.h" 53 #include "data_management/data/aos_numeric_table.h" 54 #include "data_management/data/soa_numeric_table.h" 55 #include "data_management/data/homogen_numeric_table.h" 56 #include "decision_tree_model.h" 72 namespace decision_tree
78 namespace classification
107 struct DAAL_EXPORT Parameter :
public daal::algorithms::classifier::Parameter
113 Parameter(
size_t nClasses = 2) : daal::algorithms::classifier::Parameter(nClasses),
114 pruning(reducedErrorPruning), maxTreeDepth(0), minObservationsInLeafNodes(1),
115 splitCriterion(infoGain) {}
120 services::Status check()
const DAAL_C11_OVERRIDE;
122 SplitCriterion splitCriterion;
125 size_t minObservationsInLeafNodes;
138 class DAAL_EXPORT Model :
public daal::algorithms::classifier::Model
141 DECLARE_MODEL_IFACE(Model, classifier::Model);
148 Model(
size_t nFeatures = 0);
155 static services::SharedPtr<Model> create(
size_t nFeatures = 0, services::Status *stat = NULL);
160 typedef services::SharedPtr<ModelImpl> ModelImplPtr;
166 const ModelImpl * impl()
const {
return _impl.get(); }
172 ModelImpl * impl() {
return _impl.get(); }
178 size_t getNumberOfFeatures()
const DAAL_C11_OVERRIDE;
184 void traverseDF(classifier::TreeNodeVisitor& visitor)
const;
190 void traverseBF(classifier::TreeNodeVisitor& visitor)
const;
193 Model(
size_t nFeatures, services::Status &st);
195 services::Status serializeImpl(data_management::InputDataArchive * arch) DAAL_C11_OVERRIDE;
197 services::Status deserializeImpl(
const data_management::OutputDataArchive * arch) DAAL_C11_OVERRIDE;
203 typedef services::SharedPtr<Model> ModelPtr;
204 typedef services::SharedPtr<const Model> ModelConstPtr;
208 using interface1::Parameter;
209 using interface1::Model;
210 using interface1::ModelPtr;
211 using interface1::ModelConstPtr;
daal::algorithms::decision_tree::classification::interface1::Parameter::minObservationsInLeafNodes
size_t minObservationsInLeafNodes
Definition: decision_tree_classification_model.h:125
daal::services::interface1::Status
Class that holds the results of API calls. In case of API routine failure it contains the list of err...
Definition: error_handling.h:491
daal
Definition: algorithm_base_common.h:57
daal::algorithms::classifier::interface1::Parameter
Base class for the parameters of the classification algorithm.
Definition: classifier_model.h:81
daal::algorithms::decision_tree::classification::interface1::Parameter::pruning
Pruning pruning
Definition: decision_tree_classification_model.h:123
daal::algorithms::decision_tree::classification::interface1::Parameter::splitCriterion
SplitCriterion splitCriterion
Definition: decision_tree_classification_model.h:122
daal::algorithms::decision_tree::classification::SplitCriterion
SplitCriterion
Split criterion for Decision tree classification algorithm.
Definition: decision_tree_classification_model.h:85
daal::algorithms::decision_tree::classification::interface1::Model
Base class for models trained with the Decision tree algorithm
Definition: decision_tree_classification_model.h:138
daal::algorithms::decision_tree::classification::interface1::Model::impl
const ModelImpl * impl() const
Definition: decision_tree_classification_model.h:166
daal::services::interface1::SharedPtr
Shared pointer that retains shared ownership of an object through a pointer. Several SharedPtr object...
Definition: daal_shared_ptr.h:187
daal::algorithms::classifier::interface1::Model
Base class for the model of the classification algorithm.
Definition: classifier_model.h:95
daal::algorithms::decision_tree::reducedErrorPruning
Definition: decision_tree_model.h:76
daal::algorithms::decision_tree::classification::infoGain
Definition: decision_tree_classification_model.h:88
daal::data_management::interface1::OutputDataArchive
Provides methods to restore an object from its serialized counterpart and access the restored object...
Definition: data_archive.h:978
daal::algorithms::decision_tree::classification::interface1::Parameter
Decision tree algorithm parameters.
Definition: decision_tree_classification_model.h:107
daal::algorithms::decision_tree::classification::gini
Definition: decision_tree_classification_model.h:87
daal::algorithms::decision_tree::classification::interface1::Model::impl
ModelImpl * impl()
Definition: decision_tree_classification_model.h:172
daal::algorithms::decision_tree::classification::interface1::Parameter::maxTreeDepth
size_t maxTreeDepth
Definition: decision_tree_classification_model.h:124
daal::algorithms::decision_tree::classification::interface1::Parameter::Parameter
Parameter(size_t nClasses=2)
Definition: decision_tree_classification_model.h:113
daal::algorithms::decision_tree::Pruning
Pruning
Pruning method for Decision tree algorithm.
Definition: decision_tree_model.h:73
daal::algorithms::classifier::interface1::TreeNodeVisitor
Interface of abstract visitor used in tree traversal methods.
Definition: classifier/tree_traverse.h:82