Point Cloud Library (PCL)
1.9.1
|
38 #ifndef PCL_ML_DT_DECISION_FOREST_TRAINER_H_
39 #define PCL_ML_DT_DECISION_FOREST_TRAINER_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 setMinExamplesForSplit(size_t n)
Sets the minimum number of examples to continue growing a tree.
void setThresholds(std::vector< float > &thres)
Specify the thresholds to be used when evaluating features.
This file defines compatibility wrappers for low level I/O functions.
void setNumberOfTreesToTrain(const size_t num_of_trees)
Sets the number of trees to train.
void setExamples(std::vector< ExampleIndex > &examples)
Example indices that specify the data used for training.
void setMaxTreeDepth(const size_t max_tree_depth)
Sets the maximum depth of the learned tree.
Utility class interface which is used for creating and evaluating features.
Trainer for decision trees.
Trainer for decision trees.
void setLabelData(std::vector< LabelType > &label_data)
Sets the label data corresponding to the example data.
void setStatsEstimator(pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
Sets the object for estimating the statistics for tree nodes.
Class representing a decision forest.
void setFeatureHandler(pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
Sets the feature handler used to create and evaluate features.
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 setDecisionTreeDataProvider(boost::shared_ptr< pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType > > &dtdp)
Specify the data provider.
void setRandomFeaturesAtSplitNode(bool b)
Specify if the features are randomly generated at each split node.
void setNumOfFeatures(const size_t num_of_features)
Sets the number of features used to find optimal decision features.
void setTrainingDataSet(DataSet &data_set)
Sets the input data set used for training.