|
StochTree 0.1.1
|
Sufficient statistic and associated operations for gaussian homoskedastic constant leaf outcome model. More...
#include <leaf_model.h>
Public Member Functions | |
| GaussianMultivariateRegressionSuffStat (int basis_dim) | |
| Construct a new GaussianMultivariateRegressionSuffStat object. | |
| 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 (GaussianMultivariateRegressionSuffStat &suff_stat) |
Increment the value of each sufficient statistic by the values provided by suff_stat | |
| void | AddSuffStat (GaussianMultivariateRegressionSuffStat &lhs, GaussianMultivariateRegressionSuffStat &rhs) |
Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs | |
| void | SubtractSuffStat (GaussianMultivariateRegressionSuffStat &lhs, GaussianMultivariateRegressionSuffStat &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.
|
inline |
Construct a new GaussianMultivariateRegressionSuffStat object.
| basis_dim | Size of the basis vector that defines the leaf regression |
|
inline |
Accumulate data from observation row_idx into the sufficient statistics.
| 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 |
|
inline |
Increment the value of each sufficient statistic by the values provided by suff_stat
| suff_stat | Sufficient statistic to be added to the current sufficient statistics |
|
inline |
Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
|
inline |
Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs
| lhs | First sufficient statistic ("left hand side") |
| rhs | Second sufficient statistic ("right hand side") |
|
inline |
Check whether accumulated sample size, n, is greater than some threshold.
| threshold | Value used to compute n > threshold |
|
inline |
Check whether accumulated sample size, n, is greater than or equal to some threshold.
| threshold | Value used to compute n >= threshold |