Point Cloud Library (PCL) 1.15.1
Loading...
Searching...
No Matches
pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex > Class Template Reference

Statistics estimator for regression trees which optimizes information gain and pose parameters error. More...

#include <pcl/recognition/face_detection/rf_face_utils.h>

Inheritance diagram for pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >:

Public Member Functions

 PoseClassRegressionVarianceStatsEstimator (BranchEstimator *branch_estimator)
 Constructor.
 ~PoseClassRegressionVarianceStatsEstimator () override=default
 Destructor.
std::size_t getNumOfBranches () const override
 Returns the number of branches the corresponding tree has.
LabelDataType getLabelOfNode (NodeType &node) const override
 Returns the label of the specified node.
unsigned int computeMeanAndCovarianceOffset (DataSet &data_set, std::vector< ExampleIndex > &examples, Eigen::Matrix3d &covariance_matrix, Eigen::Vector3d &centroid) const
 Computes the covariance matrix for translation offsets.
unsigned int computeMeanAndCovarianceAngles (DataSet &data_set, std::vector< ExampleIndex > &examples, Eigen::Matrix3d &covariance_matrix, Eigen::Vector3d &centroid) const
 Computes the covariance matrix for rotation values.
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 override
 Computes the information gain obtained by the specified threshold.
void computeBranchIndices (std::vector< float > &results, std::vector< unsigned char > &flags, const float threshold, std::vector< unsigned char > &branch_indices) const override
 Computes the branch indices for all supplied results.
void computeBranchIndex (const float result, const unsigned char flag, const float threshold, unsigned char &branch_index) const override
 Computes the branch index for the specified result.
void computeAndSetNodeStats (DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelDataType > &label_data, NodeType &node) const override
 Computes and sets the statistics for a node.
void generateCodeForBranchIndexComputation (NodeType &, std::ostream &stream) const override
 Generates code for branch index computation.
void generateCodeForOutput (NodeType &, std::ostream &stream) const override
 Generates code for label output.
Public Member Functions inherited from pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >
virtual ~StatsEstimator ()=default
 Destructor.

Detailed Description

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
class pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >

Statistics estimator for regression trees which optimizes information gain and pose parameters error.

Definition at line 196 of file rf_face_utils.h.

Constructor & Destructor Documentation

◆ PoseClassRegressionVarianceStatsEstimator()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::PoseClassRegressionVarianceStatsEstimator ( BranchEstimator * branch_estimator)
inline

Constructor.

Definition at line 201 of file rf_face_utils.h.

◆ ~PoseClassRegressionVarianceStatsEstimator()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::~PoseClassRegressionVarianceStatsEstimator ( )
overridedefault

Destructor.

Member Function Documentation

◆ computeAndSetNodeStats()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
void pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeAndSetNodeStats ( DataSet & data_set,
std::vector< ExampleIndex > & examples,
std::vector< LabelDataType > & label_data,
NodeType & node ) const
inlineoverridevirtual

Computes and sets the statistics for a node.

Parameters
[in]data_setThe data set which is evaluated.
[in]examplesThe examples which define which parts of the data set are used for evaluation.
[in]label_dataThe label_data corresponding to the examples.
[out]nodeThe destination node for the statistics.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 471 of file rf_face_utils.h.

References computeMeanAndCovarianceAngles(), and computeMeanAndCovarianceOffset().

◆ computeBranchIndex()

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

Computes the branch index for the specified result.

Parameters
[in]resultThe result the branch index will be computed for.
[in]flagThe flag corresponding to the specified result.
[in]thresholdThe threshold used to compute the branch index.
[out]branch_indexThe destination for the computed branch index.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 460 of file rf_face_utils.h.

Referenced by computeBranchIndices(), and computeInformationGain().

◆ computeBranchIndices()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
void pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndices ( std::vector< float > & results,
std::vector< unsigned char > & flags,
const float threshold,
std::vector< unsigned char > & branch_indices ) const
inlineoverridevirtual

Computes the branch indices for all supplied results.

Parameters
[in]resultsThe results the branch indices will be computed for.
[in]flagsThe flags corresponding to the specified results.
[in]thresholdThe threshold used to compute the branch indices.
[out]branch_indicesThe destination for the computed branch indices.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 440 of file rf_face_utils.h.

References computeBranchIndex().

◆ computeInformationGain()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
float pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< 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
inlineoverridevirtual

Computes the information gain obtained by the specified threshold.

Parameters
[in]data_setThe data set corresponding to the supplied result data.
[in]examplesThe examples used for extracting the supplied result data.
[in]label_dataThe label data corresponding to the specified examples.
[in]resultsThe results computed using the specified examples.
[in]flagsThe flags corresponding to the results.
[in]thresholdThe threshold for which the information gain is computed.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 319 of file rf_face_utils.h.

References computeBranchIndex(), computeMeanAndCovarianceAngles(), computeMeanAndCovarianceOffset(), getNumOfBranches(), and M_PI.

◆ computeMeanAndCovarianceAngles()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
unsigned int pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceAngles ( DataSet & data_set,
std::vector< ExampleIndex > & examples,
Eigen::Matrix3d & covariance_matrix,
Eigen::Vector3d & centroid ) const
inline

Computes the covariance matrix for rotation values.

Parameters
[in]data_setThe corresponding data set.
[in]examplesA set of examples from the dataset.
[out]covariance_matrixThe covariance matrix.
[out]centroidThe mean of the data.

Definition at line 273 of file rf_face_utils.h.

References pcl::face_detection::TrainingExample::rot_.

Referenced by computeAndSetNodeStats(), and computeInformationGain().

◆ computeMeanAndCovarianceOffset()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
unsigned int pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceOffset ( DataSet & data_set,
std::vector< ExampleIndex > & examples,
Eigen::Matrix3d & covariance_matrix,
Eigen::Vector3d & centroid ) const
inline

Computes the covariance matrix for translation offsets.

Parameters
[in]data_setThe corresponding data set.
[in]examplesA set of examples from the dataset.
[out]covariance_matrixThe covariance matrix.
[out]centroidThe mean of the data.

Definition at line 229 of file rf_face_utils.h.

References pcl::face_detection::TrainingExample::trans_.

Referenced by computeAndSetNodeStats(), and computeInformationGain().

◆ generateCodeForBranchIndexComputation()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
void pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForBranchIndexComputation ( NodeType & ,
std::ostream & stream ) const
inlineoverridevirtual

Generates code for branch index computation.

Parameters
[out]streamThe destination for the generated code.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 514 of file rf_face_utils.h.

◆ generateCodeForOutput()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
void pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForOutput ( NodeType & ,
std::ostream & stream ) const
inlineoverridevirtual

Generates code for label output.

Parameters
[out]streamThe destination for the generated code.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 523 of file rf_face_utils.h.

◆ getLabelOfNode()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
LabelDataType pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getLabelOfNode ( NodeType & node) const
inlineoverridevirtual

Returns the label of the specified node.

Parameters
[in]nodeThe node which label is returned.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 218 of file rf_face_utils.h.

◆ getNumOfBranches()

template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
std::size_t pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getNumOfBranches ( ) const
inlineoverridevirtual

Returns the number of branches the corresponding tree has.

Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.

Definition at line 210 of file rf_face_utils.h.

Referenced by computeInformationGain().


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