Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions
pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType > Class Template Reference

Trainer for decision trees. More...

#include <pcl/ml/dt/decision_forest_trainer.h>

Public Member Functions

 DecisionForestTrainer ()
 Constructor. More...
 
virtual ~DecisionForestTrainer ()
 Destructor. More...
 
void setNumberOfTreesToTrain (const size_t num_of_trees)
 Sets the number of trees to train. More...
 
void setFeatureHandler (pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler)
 Sets the feature handler used to create and evaluate features. More...
 
void setStatsEstimator (pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator)
 Sets the object for estimating the statistics for tree nodes. More...
 
void setMaxTreeDepth (const size_t max_tree_depth)
 Sets the maximum depth of the learned tree. More...
 
void setNumOfFeatures (const size_t num_of_features)
 Sets the number of features used to find optimal decision features. More...
 
void setNumOfThresholds (const size_t num_of_threshold)
 Sets the number of thresholds tested for finding the optimal decision threshold on the feature responses. More...
 
void setTrainingDataSet (DataSet &data_set)
 Sets the input data set used for training. More...
 
void setExamples (std::vector< ExampleIndex > &examples)
 Example indices that specify the data used for training. More...
 
void setLabelData (std::vector< LabelType > &label_data)
 Sets the label data corresponding to the example data. More...
 
void setMinExamplesForSplit (size_t n)
 Sets the minimum number of examples to continue growing a tree. More...
 
void setThresholds (std::vector< float > &thres)
 Specify the thresholds to be used when evaluating features. More...
 
void setDecisionTreeDataProvider (typename pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::Ptr &dtdp)
 Specify the data provider. More...
 
void setRandomFeaturesAtSplitNode (bool b)
 Specify if the features are randomly generated at each split node. More...
 
void train (DecisionForest< NodeType > &forest)
 Trains a decision forest using the set training data and settings. More...
 

Detailed Description

template<class FeatureType, class DataSet, class LabelType, class ExampleIndex, class NodeType>
class pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >

Trainer for decision trees.

Definition at line 58 of file decision_forest_trainer.h.

Constructor & Destructor Documentation

◆ DecisionForestTrainer()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::DecisionForestTrainer ( )

◆ ~DecisionForestTrainer()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::~DecisionForestTrainer ( )
virtual

Member Function Documentation

◆ setDecisionTreeDataProvider()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setDecisionTreeDataProvider ( typename pcl::DecisionTreeTrainerDataProvider< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::Ptr &  dtdp)
inline

Specify the data provider.

Parameters
[in]dtdpthe data provider that should implement getDatasetAndLabels() function

Definition at line 186 of file decision_forest_trainer.h.

◆ setExamples()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setExamples ( std::vector< ExampleIndex > &  examples)
inline

Example indices that specify the data used for training.

Parameters
[in]examplesthe examples

Definition at line 145 of file decision_forest_trainer.h.

◆ setFeatureHandler()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setFeatureHandler ( pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &  feature_handler)
inline

Sets the feature handler used to create and evaluate features.

Parameters
[in]feature_handlerthe feature handler

Definition at line 82 of file decision_forest_trainer.h.

◆ setLabelData()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setLabelData ( std::vector< LabelType > &  label_data)
inline

Sets the label data corresponding to the example data.

Parameters
[in]label_datathe label data

Definition at line 155 of file decision_forest_trainer.h.

◆ setMaxTreeDepth()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setMaxTreeDepth ( const size_t  max_tree_depth)
inline

Sets the maximum depth of the learned tree.

Parameters
[in]max_tree_depthmaximum depth of the learned tree

Definition at line 104 of file decision_forest_trainer.h.

◆ setMinExamplesForSplit()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setMinExamplesForSplit ( size_t  n)
inline

Sets the minimum number of examples to continue growing a tree.

Parameters
[in]nnumber of examples

Definition at line 165 of file decision_forest_trainer.h.

◆ setNumberOfTreesToTrain()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setNumberOfTreesToTrain ( const size_t  num_of_trees)
inline

Sets the number of trees to train.

Parameters
[in]num_of_treesthe number of trees

Definition at line 72 of file decision_forest_trainer.h.

◆ setNumOfFeatures()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setNumOfFeatures ( const size_t  num_of_features)
inline

Sets the number of features used to find optimal decision features.

Parameters
[in]num_of_featuresthe number of features

Definition at line 114 of file decision_forest_trainer.h.

◆ setNumOfThresholds()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setNumOfThresholds ( const 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_thresholdthe number of thresholds

Definition at line 125 of file decision_forest_trainer.h.

◆ setRandomFeaturesAtSplitNode()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setRandomFeaturesAtSplitNode ( bool  b)
inline

Specify if the features are randomly generated at each split node.

Parameters
[in]bdo it or not

Definition at line 201 of file decision_forest_trainer.h.

◆ setStatsEstimator()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setStatsEstimator ( pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &  stats_estimator)
inline

Sets the object for estimating the statistics for tree nodes.

Parameters
[in]stats_estimatorthe statistics estimator

Definition at line 93 of file decision_forest_trainer.h.

◆ setThresholds()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setThresholds ( std::vector< float > &  thres)
inline

Specify the thresholds to be used when evaluating features.

Parameters
[in]thresthe threshold values

Definition at line 175 of file decision_forest_trainer.h.

◆ setTrainingDataSet()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::setTrainingDataSet ( DataSet &  data_set)
inline

Sets the input data set used for training.

Parameters
[in]data_setthe data set used for training

Definition at line 135 of file decision_forest_trainer.h.

◆ train()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train ( pcl::DecisionForest< NodeType > &  forest)

Trains a decision forest using the set training data and settings.

Parameters
[out]forestdestination for the trained forest

Definition at line 66 of file decision_forest_trainer.hpp.

Referenced by pcl::DecisionForestTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::~DecisionForestTrainer().


The documentation for this class was generated from the following files: