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

Utility class for evaluating a decision tree. More...

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

Public Member Functions

 DecisionTreeEvaluator ()
 Constructor. More...
 
virtual ~DecisionTreeEvaluator ()
 Destructor. More...
 
void evaluate (pcl::DecisionTree< NodeType > &tree, pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler, pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator, DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelType > &label_data)
 Evaluates the specified examples using the supplied tree. More...
 
void evaluateAndAdd (pcl::DecisionTree< NodeType > &tree, pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler, pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator, DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelType > &label_data)
 Evaluates the specified examples using the supplied tree and adds the results to the supplied results array. More...
 
void evaluate (pcl::DecisionTree< NodeType > &tree, pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler, pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator, DataSet &data_set, ExampleIndex example, NodeType &leave)
 Evaluates the specified examples using the supplied tree. More...
 
void getNodes (pcl::DecisionTree< NodeType > &tree, pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &feature_handler, pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &stats_estimator, DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< NodeType * > &nodes)
 Evaluates the specified examples using the supplied tree. More...
 

Detailed Description

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

Utility class for evaluating a decision tree.

Definition at line 55 of file decision_tree_evaluator.h.

Constructor & Destructor Documentation

◆ DecisionTreeEvaluator()

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

Constructor.

◆ ~DecisionTreeEvaluator()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::~DecisionTreeEvaluator ( )
virtualdefault

Destructor.

Member Function Documentation

◆ evaluate() [1/2]

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate ( pcl::DecisionTree< NodeType > &  tree,
pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &  feature_handler,
pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &  stats_estimator,
DataSet &  data_set,
ExampleIndex  example,
NodeType &  leave 
)

Evaluates the specified examples using the supplied tree.

Parameters
[in]treethe decision tree
[in]feature_handlerthe feature handler used to train the tree
[in]stats_estimatorthe statistics estimation instance used while training the tree
[in]data_setthe data set used for evaluation
[in]examplethe example that has to be evaluated
[out]leaveThe leave reached by the examples.

Definition at line 145 of file decision_tree_evaluator.hpp.

References pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex(), pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex >::evaluateFeature(), and pcl::DecisionTree< NodeType >::getRoot().

◆ evaluate() [2/2]

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate ( pcl::DecisionTree< NodeType > &  tree,
pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &  feature_handler,
pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &  stats_estimator,
DataSet &  data_set,
std::vector< ExampleIndex > &  examples,
std::vector< LabelType > &  label_data 
)

Evaluates the specified examples using the supplied tree.

Parameters
[in]treethe decision tree
[in]feature_handlerthe feature handler used to train the tree
[in]stats_estimatorthe statistics estimation instance used while training the tree
[in]data_setthe data set used for evaluation
[in]examplesthe examples that have to be evaluated
[out]label_datathe destination for the resulting label data

Definition at line 71 of file decision_tree_evaluator.hpp.

References pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex(), pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex >::evaluateFeature(), pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getLabelOfNode(), and pcl::DecisionTree< NodeType >::getRoot().

◆ evaluateAndAdd()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd ( pcl::DecisionTree< NodeType > &  tree,
pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &  feature_handler,
pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &  stats_estimator,
DataSet &  data_set,
std::vector< ExampleIndex > &  examples,
std::vector< LabelType > &  label_data 
)

Evaluates the specified examples using the supplied tree and adds the results to the supplied results array.

Parameters
[in]treethe decision tree
[in]feature_handlerthe feature handler used to train the tree
[in]stats_estimatorthe statistics estimation instance used while training the tree
[in]data_setthe data set used for evaluation
[in]examplesthe examples that have to be evaluated
[out]label_datathe destination where the resulting label data is added to

Definition at line 108 of file decision_tree_evaluator.hpp.

References pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex(), pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex >::evaluateFeature(), pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getLabelOfNode(), and pcl::DecisionTree< NodeType >::getRoot().

◆ getNodes()

template<class FeatureType , class DataSet , class LabelType , class ExampleIndex , class NodeType >
void pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::getNodes ( pcl::DecisionTree< NodeType > &  tree,
pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex > &  feature_handler,
pcl::StatsEstimator< LabelType, NodeType, DataSet, ExampleIndex > &  stats_estimator,
DataSet &  data_set,
std::vector< ExampleIndex > &  examples,
std::vector< NodeType * > &  nodes 
)

Evaluates the specified examples using the supplied tree.

Parameters
[in]treethe decision tree
[in]feature_handlerthe feature handler used to train the tree
[in]stats_estimatorthe statistics estimation instance used while training the tree
[in]data_setthe data set used for evaluation
[in]examplesthe examples that have to be evaluated
[out]nodesthe leaf-nodes reached while evaluation

Definition at line 178 of file decision_tree_evaluator.hpp.

References pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex(), pcl::FeatureHandler< FeatureType, DataSet, ExampleIndex >::evaluateFeature(), and pcl::DecisionTree< NodeType >::getRoot().


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