automatic commit
[folded-ctf.git] / decision_tree.h
index 59dba57..5adcb0f 100644 (file)
 // You should have received a copy of the GNU General Public License     //
 // along with this program. If not, see <http://www.gnu.org/licenses/>.  //
 //                                                                       //
-// Written by Francois Fleuret, (C) IDIAP                                //
+// Written by Francois Fleuret                                           //
+// (C) Idiap Research Institute                                          //
+//                                                                       //
 // Contact <francois.fleuret@idiap.ch> 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
 
 
 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);