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

Marginal likelihood and posterior computation for gaussian homoskedastic constant leaf outcome model. More...

#include <leaf_model.h>

Public Member Functions

 GaussianMultivariateRegressionLeafModel (Eigen::MatrixXd &Sigma_0)
 Construct a new GaussianMultivariateRegressionLeafModel object.
 
double SplitLogMarginalLikelihood (GaussianMultivariateRegressionSuffStat &left_stat, GaussianMultivariateRegressionSuffStat &right_stat, double global_variance)
 Log marginal likelihood for a proposed split, evaluated only for observations that fall into the node being split.
 
double NoSplitLogMarginalLikelihood (GaussianMultivariateRegressionSuffStat &suff_stat, double global_variance)
 Log marginal likelihood of a node, evaluated only for observations that fall into the node being split.
 
Eigen::VectorXd PosteriorParameterMean (GaussianMultivariateRegressionSuffStat &suff_stat, double global_variance)
 Leaf node posterior mean.
 
Eigen::MatrixXd PosteriorParameterVariance (GaussianMultivariateRegressionSuffStat &suff_stat, double global_variance)
 Leaf node posterior variance.
 
void SampleLeafParameters (ForestDataset &dataset, ForestTracker &tracker, ColumnVector &residual, Tree *tree, int tree_num, double global_variance, std::mt19937 &gen)
 Draw new parameters for every leaf node in tree, using a Gibbs update that conditions on the data, every other tree in the forest, and all model parameters.
 

Detailed Description

Marginal likelihood and posterior computation for gaussian homoskedastic constant leaf outcome model.

Constructor & Destructor Documentation

◆ GaussianMultivariateRegressionLeafModel()

StochTree::GaussianMultivariateRegressionLeafModel::GaussianMultivariateRegressionLeafModel ( Eigen::MatrixXd &  Sigma_0)
inline

Construct a new GaussianMultivariateRegressionLeafModel object.

Parameters
Sigma_0Prior covariance, must have the same number of rows and columns as dimensions of the basis vector for the multivariate regression problem

Member Function Documentation

◆ SplitLogMarginalLikelihood()

double StochTree::GaussianMultivariateRegressionLeafModel::SplitLogMarginalLikelihood ( GaussianMultivariateRegressionSuffStat left_stat,
GaussianMultivariateRegressionSuffStat right_stat,
double  global_variance 
)

Log marginal likelihood for a proposed split, evaluated only for observations that fall into the node being split.

Parameters
left_statSufficient statistics of the left node formed by the proposed split
right_statSufficient statistics of the right node formed by the proposed split
global_varianceGlobal error variance parameter

◆ NoSplitLogMarginalLikelihood()

double StochTree::GaussianMultivariateRegressionLeafModel::NoSplitLogMarginalLikelihood ( GaussianMultivariateRegressionSuffStat suff_stat,
double  global_variance 
)

Log marginal likelihood of a node, evaluated only for observations that fall into the node being split.

Parameters
suff_statSufficient statistics of the node being evaluated
global_varianceGlobal error variance parameter

◆ PosteriorParameterMean()

Eigen::VectorXd StochTree::GaussianMultivariateRegressionLeafModel::PosteriorParameterMean ( GaussianMultivariateRegressionSuffStat suff_stat,
double  global_variance 
)

Leaf node posterior mean.

Parameters
suff_statSufficient statistics of the node being evaluated
global_varianceGlobal error variance parameter

◆ PosteriorParameterVariance()

Eigen::MatrixXd StochTree::GaussianMultivariateRegressionLeafModel::PosteriorParameterVariance ( GaussianMultivariateRegressionSuffStat suff_stat,
double  global_variance 
)

Leaf node posterior variance.

Parameters
suff_statSufficient statistics of the node being evaluated
global_varianceGlobal error variance parameter

◆ SampleLeafParameters()

void StochTree::GaussianMultivariateRegressionLeafModel::SampleLeafParameters ( ForestDataset dataset,
ForestTracker tracker,
ColumnVector residual,
Tree tree,
int  tree_num,
double  global_variance,
std::mt19937 &  gen 
)

Draw new parameters for every leaf node in tree, using a Gibbs update that conditions on the data, every other tree in the forest, and all model parameters.

Parameters
datasetData object containining training data, including covariates, leaf regression bases, and case weights
trackerTracking data structures that speed up sampler operations, synchronized with active_forest tracking a forest's state
residualData object containing the "partial" residual net of all the model's other mean terms, aside from tree
treeTree to be updated
tree_numInteger index of tree to be updated
global_varianceValue of the global error variance parameter
genC++ random number generator

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