Point Cloud Library (PCL)
1.14.1-dev
|
Statistics estimator for regression trees which optimizes information gain and pose parameters error. More...
#include <pcl/recognition/face_detection/rf_face_utils.h>
Public Member Functions | |
PoseClassRegressionVarianceStatsEstimator (BranchEstimator *branch_estimator) | |
Constructor. More... | |
~PoseClassRegressionVarianceStatsEstimator () override=default | |
Destructor. More... | |
std::size_t | getNumOfBranches () const override |
Returns the number of branches the corresponding tree has. More... | |
LabelDataType | getLabelOfNode (NodeType &node) const override |
Returns the label of the specified node. More... | |
unsigned int | computeMeanAndCovarianceOffset (DataSet &data_set, std::vector< ExampleIndex > &examples, Eigen::Matrix3d &covariance_matrix, Eigen::Vector3d ¢roid) const |
Computes the covariance matrix for translation offsets. More... | |
unsigned int | computeMeanAndCovarianceAngles (DataSet &data_set, std::vector< ExampleIndex > &examples, Eigen::Matrix3d &covariance_matrix, Eigen::Vector3d ¢roid) const |
Computes the covariance matrix for rotation values. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | generateCodeForBranchIndexComputation (NodeType &, std::ostream &stream) const override |
Generates code for branch index computation. More... | |
void | generateCodeForOutput (NodeType &, std::ostream &stream) const override |
Generates code for label output. More... | |
Public Member Functions inherited from pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex > | |
virtual | ~StatsEstimator ()=default |
Destructor. More... | |
Statistics estimator for regression trees which optimizes information gain and pose parameters error.
Definition at line 196 of file rf_face_utils.h.
|
inline |
Constructor.
Definition at line 201 of file rf_face_utils.h.
|
overridedefault |
Destructor.
|
inlineoverridevirtual |
Computes and sets the statistics for a node.
[in] | data_set | The data set which is evaluated. |
[in] | examples | The examples which define which parts of the data set are used for evaluation. |
[in] | label_data | The label_data corresponding to the examples. |
[out] | node | The destination node for the statistics. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 471 of file rf_face_utils.h.
References pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceAngles(), and pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceOffset().
|
inlineoverridevirtual |
Computes the branch index for the specified result.
[in] | result | The result the branch index will be computed for. |
[in] | flag | The flag corresponding to the specified result. |
[in] | threshold | The threshold used to compute the branch index. |
[out] | branch_index | The destination for the computed branch index. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 460 of file rf_face_utils.h.
References pcl::BranchEstimator::computeBranchIndex().
Referenced by pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndices(), and pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeInformationGain().
|
inlineoverridevirtual |
Computes the branch indices for all supplied results.
[in] | results | The results the branch indices will be computed for. |
[in] | flags | The flags corresponding to the specified results. |
[in] | threshold | The threshold used to compute the branch indices. |
[out] | branch_indices | The destination for the computed branch indices. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 440 of file rf_face_utils.h.
|
inlineoverridevirtual |
Computes the information gain obtained by the specified threshold.
[in] | data_set | The data set corresponding to the supplied result data. |
[in] | examples | The examples used for extracting the supplied result data. |
[in] | label_data | The label data corresponding to the specified examples. |
[in] | results | The results computed using the specified examples. |
[in] | flags | The flags corresponding to the results. |
[in] | threshold | The 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 pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex(), pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceAngles(), pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeMeanAndCovarianceOffset(), pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getNumOfBranches(), and M_PI.
|
inline |
Computes the covariance matrix for rotation values.
[in] | data_set | The corresponding data set. |
[in] | examples | A set of examples from the dataset. |
[out] | covariance_matrix | The covariance matrix. |
[out] | centroid | The mean of the data. |
Definition at line 273 of file rf_face_utils.h.
References pcl::face_detection::TrainingExample::rot_.
Referenced by pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeAndSetNodeStats(), and pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeInformationGain().
|
inline |
Computes the covariance matrix for translation offsets.
[in] | data_set | The corresponding data set. |
[in] | examples | A set of examples from the dataset. |
[out] | covariance_matrix | The covariance matrix. |
[out] | centroid | The mean of the data. |
Definition at line 229 of file rf_face_utils.h.
References pcl::face_detection::TrainingExample::trans_.
Referenced by pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeAndSetNodeStats(), and pcl::face_detection::PoseClassRegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeInformationGain().
|
inlineoverridevirtual |
Generates code for branch index computation.
[out] | stream | The destination for the generated code. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 514 of file rf_face_utils.h.
|
inlineoverridevirtual |
Generates code for label output.
[out] | stream | The destination for the generated code. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 523 of file rf_face_utils.h.
|
inlineoverridevirtual |
Returns the label of the specified node.
[in] | node | The node which label is returned. |
Implements pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >.
Definition at line 218 of file rf_face_utils.h.
|
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.
References pcl::BranchEstimator::getNumOfBranches().