Point Cloud Library (PCL)
1.8.0
|
Class interface for gathering statistics for decision tree learning. More...
#include <pcl/ml/stats_estimator.h>
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... | |
Class interface for gathering statistics for decision tree learning.
Definition at line 55 of file stats_estimator.h.
|
inlinevirtual |
Destructor.
Definition at line 62 of file stats_estimator.h.
|
pure virtual |
Computes and sets the statistics for a node.
[in] | data_set | The data set used for training. |
[in] | examples | The examples used for computing the statistics for the specified node. |
[in] | label_data | The labels corresponding to the examples. |
[out] | node | The 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().
|
pure virtual |
Computes the branch indices obtained by the specified threshold on the supplied feature evaluation results.
[in] | result | The result obtained from the feature evaluation. |
[in] | flag | The flag obtained together with the result. |
[in] | threshold | The threshold which is used to compute the branch index. |
[out] | branch_index | The 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().
|
pure virtual |
Computes the branch indices obtained by the specified threshold on the supplied feature evaluation results.
[in] | results | The results obtained from the feature evaluation. |
[in] | flags | The flags obtained together with the results. |
[in] | threshold | The threshold which is used to compute the branch indices. |
[out] | branch_indices | The destination for the computed branch indices. |
Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Referenced by pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd(), pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::getNodes(), pcl::FernTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train(), and pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::trainDecisionTreeNode().
|
pure virtual |
Computes the information gain obtained by the specified threshold on the supplied feature evaluation results.
[in] | data_set | The data set used for extracting the supplied result values. |
[in] | examples | The examples used to extract the supplied result values. |
[in] | label_data | The labels corresponding to the examples. |
[in] | results | The results obtained from the feature evaluation. |
[in] | flags | The flags obtained together with the results. |
[in] | threshold | The 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().
|
pure virtual |
Generates code for computing the branch indices for the specified node and writes it to the specified stream.
[in] | node | The node for which the branch index estimation code is generated. |
[out] | stream | The destionation for the code. |
Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
|
pure virtual |
Generates code for computing the output for the specified node and writes it to the specified stream.
[in] | node | The node for which the output estimation code is generated. |
[out] | stream | The destionation for the code. |
Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
|
pure virtual |
Returns the label of the specified node.
[in] | node | The node from which the label is extracted. |
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::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd(), and pcl::DecisionTreeEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd().
|
pure virtual |
Returns the number of brances a node can have (e.g.
a binary tree has 2).
Implemented in pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >, and pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Referenced by pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluate(), pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::evaluateAndAdd(), pcl::FernEvaluator< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::getNodes(), pcl::FernTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::train(), and pcl::DecisionTreeTrainer< FeatureType, DataSet, LabelType, ExampleIndex, NodeType >::trainDecisionTreeNode().