Sufficient statistic and associated operations for gaussian homoskedastic constant leaf outcome model.
More...
#include <leaf_model.h>
|
|
| GaussianConstantSuffStat () |
| | Construct a new GaussianConstantSuffStat object, setting all sufficient statistics to zero.
|
| |
| void | IncrementSuffStat (ForestDataset &dataset, Eigen::VectorXd &outcome, ForestTracker &tracker, data_size_t row_idx, int tree_idx) |
| | Accumulate data from observation row_idx into the sufficient statistics.
|
| |
|
void | ResetSuffStat () |
| | Reset all of the sufficient statistics to zero.
|
| |
| void | AddSuffStatInplace (GaussianConstantSuffStat &suff_stat) |
| | Increment the value of each sufficient statistic by the values provided by suff_stat
|
| |
| void | AddSuffStat (GaussianConstantSuffStat &lhs, GaussianConstantSuffStat &rhs) |
| | Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs
|
| |
| void | SubtractSuffStat (GaussianConstantSuffStat &lhs, GaussianConstantSuffStat &rhs) |
| | Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs
|
| |
| bool | SampleGreaterThan (data_size_t threshold) |
| | Check whether accumulated sample size, n, is greater than some threshold.
|
| |
| bool | SampleGreaterThanEqual (data_size_t threshold) |
| | Check whether accumulated sample size, n, is greater than or equal to some threshold.
|
| |
|
data_size_t | SampleSize () |
| | Return the sample size accumulated by a sufficient stat object.
|
| |
Sufficient statistic and associated operations for gaussian homoskedastic constant leaf outcome model.
◆ IncrementSuffStat()
| void StochTree::GaussianConstantSuffStat::IncrementSuffStat |
( |
ForestDataset & |
dataset, |
|
|
Eigen::VectorXd & |
outcome, |
|
|
ForestTracker & |
tracker, |
|
|
data_size_t |
row_idx, |
|
|
int |
tree_idx |
|
) |
| |
|
inline |
Accumulate data from observation row_idx into the sufficient statistics.
- Parameters
-
| dataset | Data object containining training data, including covariates, leaf regression bases, and case weights |
| outcome | Data object containing the "partial" residual net of all the model's other mean terms, aside from tree |
| tracker | Tracking data structures that speed up sampler operations, synchronized with active_forest tracking a forest's state |
| row_idx | Index of the training data observation from which the sufficient statistics should be updated |
| tree_idx | Index of the tree being updated in the course of this sufficient statistic update |
◆ AddSuffStatInplace()
Increment the value of each sufficient statistic by the values provided by suff_stat
- Parameters
-
| suff_stat | Sufficient statistic to be added to the current sufficient statistics |
◆ AddSuffStat()
Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs
- Parameters
-
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
◆ SubtractSuffStat()
Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs
- Parameters
-
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
◆ SampleGreaterThan()
| bool StochTree::GaussianConstantSuffStat::SampleGreaterThan |
( |
data_size_t |
threshold | ) |
|
|
inline |
Check whether accumulated sample size, n, is greater than some threshold.
- Parameters
-
| threshold | Value used to compute n > threshold |
◆ SampleGreaterThanEqual()
| bool StochTree::GaussianConstantSuffStat::SampleGreaterThanEqual |
( |
data_size_t |
threshold | ) |
|
|
inline |
Check whether accumulated sample size, n, is greater than or equal to some threshold.
- Parameters
-
| threshold | Value used to compute n >= threshold |
The documentation for this class was generated from the following file: