|
| DecisionTreeTrainer () |
| Constructor.
|
|
virtual | ~DecisionTreeTrainer () |
| Destructor.
|
|
void | setFeatureHandler (pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler) |
| Sets the feature handler used to create and evaluate features.
|
|
void | setStatsEstimator (pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator) |
| Sets the object for estimating the statistics for tree nodes.
|
|
void | setMaxTreeDepth (const std::size_t max_tree_depth) |
| Sets the maximum depth of the learned tree.
|
|
void | setNumOfFeatures (const std::size_t num_of_features) |
| Sets the number of features used to find optimal decision features.
|
|
void | setNumOfThresholds (const std::size_t num_of_threshold) |
| Sets the number of thresholds tested for finding the optimal decision threshold on the feature responses.
|
|
void | setTrainingDataSet (DataSet &data_set) |
| Sets the input data set used for training.
|
|
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 | setMinExamplesForSplit (std::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.
|
|
void | setDecisionTreeDataProvider (typename pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::Ptr &dtdp) |
| Specify the data provider.
|
|
void | setRandomFeaturesAtSplitNode (bool b) |
| Specify if the features are randomly generated at each split node.
|
|
void | train (DecisionTree< NodeType > &tree) |
| Trains a decision tree using the set training data and settings.
|
|
template<class FeatureType, class DataSet, class LabelType, class ExampleIndex, class NodeType>
class pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >
Trainer for decision trees.
Definition at line 56 of file decision_tree_trainer.h.
template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::createThresholdsUniform |
( |
const std::size_t |
num_of_thresholds, |
|
|
std::vector< float > & |
values, |
|
|
std::vector< float > & |
thresholds |
|
) |
| |
|
staticprotected |
Creates uniformely distrebuted thresholds over the range of the supplied values.
- Parameters
-
[in] | num_of_thresholds | the number of thresholds to create |
[in] | values | the values for estimating the expected value range |
[out] | thresholds | the resulting thresholds |
Definition at line 277 of file decision_tree_trainer.hpp.
template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setNumOfThresholds |
( |
const std::size_t |
num_of_threshold | ) |
|
|
inline |
Sets the number of thresholds tested for finding the optimal decision threshold on the feature responses.
- Parameters
-
[in] | num_of_threshold | the number of thresholds |
Definition at line 113 of file decision_tree_trainer.h.
template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::trainDecisionTreeNode |
( |
std::vector< FeatureType > & |
features, |
|
|
std::vector< ExampleIndex > & |
examples, |
|
|
std::vector< LabelType > & |
label_data, |
|
|
std::size_t |
max_depth, |
|
|
NodeType & |
node |
|
) |
| |
|
protected |
Trains a decision tree node from the specified features, label data, and examples.
- Parameters
-
[in] | features | the feature pool used for training |
[in] | examples | the examples used for training |
[in] | label_data | the label data corresponding to the examples |
[in] | max_depth | the maximum depth of the remaining tree |
[out] | node | the resulting node |
Definition at line 112 of file decision_tree_trainer.hpp.