X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=folded-ctf.git;a=blobdiff_plain;f=decision_tree.h;h=5adcb0f3e25e33e569b41d248694d1a517e91635;hp=70fdcad75a3a606be508a66b86217d59c6dd4e33;hb=aed34255065b18c445d096f51bd2091833810a81;hpb=20ec321944108cd1fe74b37ea45db3ba1a2d526a diff --git a/decision_tree.h b/decision_tree.h index 70fdcad..5adcb0f 100644 --- a/decision_tree.h +++ b/decision_tree.h @@ -18,6 +18,16 @@ // Contact for comments & bug reports // /////////////////////////////////////////////////////////////////////////// +/* + + An implementation of the classifier with a decision tree. Each node + simply thresholds one of the component, and is chosen for maximum + loss reduction locally during training. The leaves are labelled with + the classifier response, which is chosen again for maximum loss + reduction. + + */ + #ifndef DECISION_TREE_H #define DECISION_TREE_H @@ -28,14 +38,14 @@ class DecisionTree : public Classifier { + static const int min_nb_samples_for_split = 5; + int _feature_index; scalar_t _threshold; scalar_t _weight; DecisionTree *_subtree_lesser, *_subtree_greater; - static const int min_nb_samples_for_split = 5; - void pick_best_split(SampleSet *sample_set, scalar_t *loss_derivatives);