42 #include <pcl/ml/dt/decision_tree.h>
43 #include <pcl/ml/dt/decision_tree_data_provider.h>
44 #include <pcl/ml/feature_handler.h>
45 #include <pcl/ml/stats_estimator.h>
52 template <
class FeatureType,
74 feature_handler_ = &feature_handler;
85 stats_estimator_ = &stats_estimator;
95 max_tree_depth_ = max_tree_depth;
105 num_of_features_ = num_of_features;
116 num_of_thresholds_ = num_of_threshold;
126 data_set_ = data_set;
136 examples_ = examples;
146 label_data_ = label_data;
156 min_examples_for_split_ = n;
180 NodeType>::Ptr& dtdp)
182 decision_tree_trainer_data_provider_ = dtdp;
192 random_features_at_split_node_ = b;
213 trainDecisionTreeNode(std::vector<FeatureType>& features,
214 std::vector<ExampleIndex>& examples,
215 std::vector<LabelType>& label_data,
216 std::size_t max_depth,
227 createThresholdsUniform(
const std::size_t num_of_thresholds,
228 std::vector<float>& values,
229 std::vector<float>& thresholds);
233 std::size_t max_tree_depth_;
235 std::size_t num_of_features_;
237 std::size_t num_of_thresholds_;
247 std::vector<LabelType> label_data_;
249 std::vector<ExampleIndex> examples_;
252 std::size_t min_examples_for_split_;
254 std::vector<float> thresholds_;
262 decision_tree_trainer_data_provider_;
265 bool random_features_at_split_node_;
270 #include <pcl/ml/impl/dt/decision_tree_trainer.hpp>