Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions
pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex > Class Template Referenceabstract

Class interface for gathering statistics for decision tree learning. More...

#include <pcl/ml/stats_estimator.h>

+ Inheritance diagram for pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >:

Public Member Functions

virtual ~StatsEstimator ()
 Destructor. More...
 
virtual size_t getNumOfBranches () const =0
 Returns the number of brances a node can have (e.g. More...
 
virtual void computeAndSetNodeStats (DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelDataType > &label_data, NodeType &node) const =0
 Computes and sets the statistics for a node. More...
 
virtual LabelDataType getLabelOfNode (NodeType &node) const =0
 Returns the label of the specified node. More...
 
virtual float computeInformationGain (DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelDataType > &label_data, std::vector< float > &results, std::vector< unsigned char > &flags, const float threshold) const =0
 Computes the information gain obtained by the specified threshold on the supplied feature evaluation results. More...
 
virtual void computeBranchIndices (std::vector< float > &results, std::vector< unsigned char > &flags, const float threshold, std::vector< unsigned char > &branch_indices) const =0
 Computes the branch indices obtained by the specified threshold on the supplied feature evaluation results. More...
 
virtual void computeBranchIndex (const float result, const unsigned char flag, const float threshold, unsigned char &branch_index) const =0
 Computes the branch indices obtained by the specified threshold on the supplied feature evaluation results. More...
 
virtual void generateCodeForBranchIndexComputation (NodeType &node, std::ostream &stream) const =0
 Generates code for computing the branch indices for the specified node and writes it to the specified stream. More...
 
virtual void generateCodeForOutput (NodeType &node, std::ostream &stream) const =0
 Generates code for computing the output for the specified node and writes it to the specified stream. More...
 

Detailed Description

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
class pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >

Class interface for gathering statistics for decision tree learning.

Definition at line 54 of file stats_estimator.h.

Constructor & Destructor Documentation

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::~StatsEstimator ( )
inlinevirtual

Destructor.

Definition at line 61 of file stats_estimator.h.

Member Function Documentation

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual void pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeAndSetNodeStats ( DataSet &  data_set,
std::vector< ExampleIndex > &  examples,
std::vector< LabelDataType > &  label_data,
NodeType &  node 
) const
pure virtual

Computes and sets the statistics for a node.

Parameters
[in]data_setThe data set used for training.
[in]examplesThe examples used for computing the statistics for the specified node.
[in]label_dataThe labels corresponding to the examples.
[out]nodeThe destination node for the statistics.

Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Referenced by pcl::FernTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train(), and pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::trainDecisionTreeNode().

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual void pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex ( const float  result,
const unsigned char  flag,
const float  threshold,
unsigned char &  branch_index 
) const
pure virtual

Computes the branch indices obtained by the specified threshold on the supplied feature evaluation results.

Parameters
[in]resultThe result obtained from the feature evaluation.
[in]flagThe flag obtained together with the result.
[in]thresholdThe threshold which is used to compute the branch index.
[out]branch_indexThe destination for the computed branch index.

Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Referenced by pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd(), and pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::getNodes().

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual void pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndices ( std::vector< float > &  results,
std::vector< unsigned char > &  flags,
const float  threshold,
std::vector< unsigned char > &  branch_indices 
) const
pure virtual
template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual float pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeInformationGain ( DataSet &  data_set,
std::vector< ExampleIndex > &  examples,
std::vector< LabelDataType > &  label_data,
std::vector< float > &  results,
std::vector< unsigned char > &  flags,
const float  threshold 
) const
pure virtual

Computes the information gain obtained by the specified threshold on the supplied feature evaluation results.

Parameters
[in]data_setThe data set used for extracting the supplied result values.
[in]examplesThe examples used to extract the supplied result values.
[in]label_dataThe labels corresponding to the examples.
[in]resultsThe results obtained from the feature evaluation.
[in]flagsThe flags obtained together with the results.
[in]thresholdThe threshold which is used to compute the information gain.

Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Referenced by pcl::FernTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train(), and pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::trainDecisionTreeNode().

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual void pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForBranchIndexComputation ( NodeType &  node,
std::ostream &  stream 
) const
pure virtual

Generates code for computing the branch indices for the specified node and writes it to the specified stream.

Parameters
[in]nodeThe node for which the branch index estimation code is generated.
[out]streamThe destination for the code.

Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual void pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForOutput ( NodeType &  node,
std::ostream &  stream 
) const
pure virtual

Generates code for computing the output for the specified node and writes it to the specified stream.

Parameters
[in]nodeThe node for which the output estimation code is generated.
[out]streamThe destination for the code.

Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual LabelDataType pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getLabelOfNode ( NodeType &  node) const
pure virtual
template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
virtual size_t pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getNumOfBranches ( ) const
pure virtual

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