38 #ifndef PCL_ML_DT_DECISION_FOREST_TRAINER_H_ 39 #define PCL_ML_DT_DECISION_FOREST_TRAINER_H_ 41 #include <pcl/common/common.h> 43 #include <pcl/ml/dt/decision_forest.h> 44 #include <pcl/ml/dt/decision_tree.h> 45 #include <pcl/ml/dt/decision_tree_trainer.h> 46 #include <pcl/ml/feature_handler.h> 47 #include <pcl/ml/stats_estimator.h> 78 num_of_trees_to_train_ = num_of_trees;
87 decision_tree_trainer_.setFeatureHandler (feature_handler);
96 decision_tree_trainer_.setStatsEstimator (stats_estimator);
105 decision_tree_trainer_.setMaxTreeDepth (max_tree_depth);
114 decision_tree_trainer_.setNumOfFeatures (num_of_features);
123 decision_tree_trainer_.setNumOfThresholds (num_of_threshold);
132 decision_tree_trainer_.setTrainingDataSet (data_set);
141 decision_tree_trainer_.setExamples (examples);
150 decision_tree_trainer_.setLabelData (label_data);
159 decision_tree_trainer_.setMinExamplesForSplit(n);
168 decision_tree_trainer_.setThresholds(thres);
177 decision_tree_trainer_.setDecisionTreeDataProvider(dtdp);
186 decision_tree_trainer_.setRandomFeaturesAtSplitNode(b);
198 size_t num_of_trees_to_train_;
207 #include <pcl/ml/impl/dt/decision_forest_trainer.hpp> void setThresholds(std::vector< float > &thres)
Specify the thresholds to be used when evaluating features.
Class representing a decision forest.
void setTrainingDataSet(DataSet &data_set)
Sets the input data set used for training.
Trainer for decision trees.
void setMinExamplesForSplit(size_t n)
Sets the minimum number of examples to continue growing a tree.
Trainer for decision trees.
void setNumberOfTreesToTrain(const size_t num_of_trees)
Sets the number of trees to train.
void setStatsEstimator(pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
Sets the object for estimating the statistics for tree nodes.
void setNumOfThresholds(const size_t num_of_threshold)
Sets the number of thresholds tested for finding the optimal decision threshold on the feature respon...
void setRandomFeaturesAtSplitNode(bool b)
Specify if the features are randomly generated at each split node.
void setExamples(std::vector< ExampleIndex > &examples)
Example indices that specify the data used for training.
void setLabelData(std::vector< LabelType > &label_data)
Sets the label data corresponding to the example data.
void setDecisionTreeDataProvider(boost::shared_ptr< pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType > > &dtdp)
Specify the data provider.
void setNumOfFeatures(const size_t num_of_features)
Sets the number of features used to find optimal decision features.
void setMaxTreeDepth(const size_t max_tree_depth)
Sets the maximum depth of the learned tree.
void setFeatureHandler(pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
Sets the feature handler used to create and evaluate features.
Utility class interface which is used for creating and evaluating features.