StochTree 0.1.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StochTree::GaussianMultivariateRegressionSuffStat Class Reference

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 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.
 

Detailed Description

Sufficient statistic and associated operations for gaussian homoskedastic constant leaf outcome model.

Constructor & Destructor Documentation

◆ GaussianMultivariateRegressionSuffStat()

StochTree::GaussianMultivariateRegressionSuffStat::GaussianMultivariateRegressionSuffStat ( int  basis_dim)
inline

Construct a new GaussianMultivariateRegressionSuffStat object.

Parameters
basis_dimSize of the basis vector that defines the leaf regression

Member Function Documentation

◆ IncrementSuffStat()

void StochTree::GaussianMultivariateRegressionSuffStat::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
datasetData object containining training data, including covariates, leaf regression bases, and case weights
outcomeData object containing the "partial" residual net of all the model's other mean terms, aside from tree
trackerTracking data structures that speed up sampler operations, synchronized with active_forest tracking a forest's state
row_idxIndex of the training data observation from which the sufficient statistics should be updated
tree_idxIndex of the tree being updated in the course of this sufficient statistic update

◆ AddSuffStat()

void StochTree::GaussianMultivariateRegressionSuffStat::AddSuffStat ( GaussianMultivariateRegressionSuffStat lhs,
GaussianMultivariateRegressionSuffStat rhs 
)
inline

Set the value of each sufficient statistic to the sum of the values provided by lhs and rhs

Parameters
lhsFirst sufficient statistic ("left hand side")
rhsSecond sufficient statistic ("right hand side")

◆ SubtractSuffStat()

void StochTree::GaussianMultivariateRegressionSuffStat::SubtractSuffStat ( GaussianMultivariateRegressionSuffStat lhs,
GaussianMultivariateRegressionSuffStat rhs 
)
inline

Set the value of each sufficient statistic to the difference between the values provided by lhs and those provided by rhs

Parameters
lhsFirst sufficient statistic ("left hand side")
rhsSecond sufficient statistic ("right hand side")

◆ SampleGreaterThan()

bool StochTree::GaussianMultivariateRegressionSuffStat::SampleGreaterThan ( data_size_t  threshold)
inline

Check whether accumulated sample size, n, is greater than some threshold.

Parameters
thresholdValue used to compute n > threshold

◆ SampleGreaterThanEqual()

bool StochTree::GaussianMultivariateRegressionSuffStat::SampleGreaterThanEqual ( data_size_t  threshold)
inline

Check whether accumulated sample size, n, is greater than or equal to some threshold.

Parameters
thresholdValue used to compute n >= threshold

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