pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex > Class Template Reference

Statistics estimator for regression trees which optimizes variance. More...

`#include <pcl/ml/regression_variance_stats_estimator.h>`

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

## Public Member Functions

| RegressionVarianceStatsEstimator (BranchEstimator *branch_estimator)
| Constructor. More...
virtual | ~RegressionVarianceStatsEstimator ()
| Destructor. More...
std::size_t | getNumOfBranches () const
| Returns the number of branches the corresponding tree has. More...
LabelDataType | getLabelOfNode (NodeType &node) const
| Returns the label of the specified node. 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
| 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
| 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
| 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
| Computes and sets the statistics for a node. More...
void | generateCodeForBranchIndexComputation (NodeType &node, std::ostream &stream) const
| Generates code for branch index computation. More...
void | generateCodeForOutput (NodeType &node, std::ostream &stream) const
| Generates code for label output. More...
Public Member Functions inherited from pcl::StatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >
virtual | ~StatsEstimator ()
| Destructor. More...

## Detailed Description

### template<class LabelDataType, class NodeType, class DataSet, class ExampleIndex>
class pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >

Statistics estimator for regression trees which optimizes variance.

Definition at line 126 of file regression_variance_stats_estimator.h.

## Constructor & Destructor Documentation

## RegressionVarianceStatsEstimator()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::RegressionVarianceStatsEstimator | ( | BranchEstimator * | branch_estimator | ) |

inline

Constructor.

Definition at line 130 of file regression_variance_stats_estimator.h.

## ~RegressionVarianceStatsEstimator()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

virtual pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::~RegressionVarianceStatsEstimator | ( |  | ) |

inline virtual

Destructor.

Definition at line 135 of file regression_variance_stats_estimator.h.

## Member Function Documentation

## computeAndSetNodeStats()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

void pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeAndSetNodeStats | ( | DataSet & | data_set,
|  | std::vector< ExampleIndex > & | examples,
|  | std::vector< LabelDataType > & | label_data,
|  | NodeType & | node
| ) |  | const

inline virtual

Computes and sets the statistics for a node.

Parameters

  [in] | data_set | the data set which is evaluated
  [in] | examples | the examples which define which parts of the data set are use 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 276 of file regression_variance_stats_estimator.h.

## computeBranchIndex()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

void pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndex | ( | const float | result,
|  | const unsigned char | flag,
|  | const float | threshold,
|  | unsigned char & | branch_index
| ) |  | const

inline virtual

Computes the branch index for the specified result.

Parameters

  [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 258 of file regression_variance_stats_estimator.h.

## computeBranchIndices()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

void pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::computeBranchIndices | ( | std::vector< float > & | results,
|  | std::vector< unsigned char > & | flags,
|  | const float | threshold,
|  | std::vector< unsigned char > & | branch_indices
| ) |  | const

inline virtual

Computes the branch indices for all supplied results.

Parameters

  [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 233 of file regression_variance_stats_estimator.h.

## computeInformationGain()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

float pcl::RegressionVarianceStatsEstimator< 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

inline virtual

Computes the information gain obtained by the specified threshold.

Parameters

  [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 165 of file regression_variance_stats_estimator.h.

## generateCodeForBranchIndexComputation()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

void pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForBranchIndexComputation | ( | NodeType & | node,
|  | std::ostream & | stream
| ) |  | const

inline virtual

Generates code for branch index computation.

Parameters

  [in] | node | the node for which code is generated
  [out] | stream | the destination for the generated code

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

Definition at line 308 of file regression_variance_stats_estimator.h.

## generateCodeForOutput()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

void pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::generateCodeForOutput | ( | NodeType & | node,
|  | std::ostream & | stream
| ) |  | const

inline virtual

Generates code for label output.

Parameters

  [in] | node | the node for which code is generated
  [out] | stream | the destination for the generated code

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

Definition at line 320 of file regression_variance_stats_estimator.h.

## getLabelOfNode()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

LabelDataType pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getLabelOfNode | ( | NodeType & | node | ) | const

inline virtual

Returns the label of the specified node.

Parameters

  [in] | node | the node which label is returned

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

Definition at line 150 of file regression_variance_stats_estimator.h.

## getNumOfBranches()

template<class LabelDataType , class NodeType , class DataSet , class ExampleIndex >

std::size_t pcl::RegressionVarianceStatsEstimator< LabelDataType, NodeType, DataSet, ExampleIndex >::getNumOfBranches | ( |  | ) | const

inline virtual

Returns the number of branches the corresponding tree has.

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

Definition at line 139 of file regression_variance_stats_estimator.h.

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

- pcl/ml/regression_variance_stats_estimator.h