|
StochTree 0.2.1
|
Marginal likelihood and posterior computation for gaussian homoskedastic constant leaf outcome model. More...
#include <leaf_model.h>
Public Member Functions | |
| GaussianConstantLeafModel (double tau) | |
| Construct a new GaussianConstantLeafModel object. | |
| double | SplitLogMarginalLikelihood (GaussianConstantSuffStat &left_stat, GaussianConstantSuffStat &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 (GaussianConstantSuffStat &suff_stat, double global_variance) |
| Log marginal likelihood of a node, evaluated only for observations that fall into the node being split. | |
| double | PosteriorParameterMean (GaussianConstantSuffStat &suff_stat, double global_variance) |
| Leaf node posterior mean. | |
| double | PosteriorParameterVariance (GaussianConstantSuffStat &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. | |
| void | SetScale (double tau) |
| Set a new value for the leaf node scale parameter. | |
| bool | RequiresBasis () |
| Whether this model requires a basis vector for posterior inference and prediction. | |
Marginal likelihood and posterior computation for gaussian homoskedastic constant leaf outcome model.
|
inline |
Construct a new GaussianConstantLeafModel object.
| tau | Leaf node prior scale parameter |
| double StochTree::GaussianConstantLeafModel::SplitLogMarginalLikelihood | ( | GaussianConstantSuffStat & | left_stat, |
| GaussianConstantSuffStat & | right_stat, | ||
| double | global_variance | ||
| ) |
Log marginal likelihood for a proposed split, evaluated only for observations that fall into the node being split.
| left_stat | Sufficient statistics of the left node formed by the proposed split |
| right_stat | Sufficient statistics of the right node formed by the proposed split |
| global_variance | Global error variance parameter |
| double StochTree::GaussianConstantLeafModel::NoSplitLogMarginalLikelihood | ( | GaussianConstantSuffStat & | suff_stat, |
| double | global_variance | ||
| ) |
Log marginal likelihood of a node, evaluated only for observations that fall into the node being split.
| suff_stat | Sufficient statistics of the node being evaluated |
| global_variance | Global error variance parameter |
| double StochTree::GaussianConstantLeafModel::PosteriorParameterMean | ( | GaussianConstantSuffStat & | suff_stat, |
| double | global_variance | ||
| ) |
Leaf node posterior mean.
| suff_stat | Sufficient statistics of the node being evaluated |
| global_variance | Global error variance parameter |
| double StochTree::GaussianConstantLeafModel::PosteriorParameterVariance | ( | GaussianConstantSuffStat & | suff_stat, |
| double | global_variance | ||
| ) |
Leaf node posterior variance.
| suff_stat | Sufficient statistics of the node being evaluated |
| global_variance | Global error variance parameter |
| void StochTree::GaussianConstantLeafModel::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.
| dataset | Data object containining training data, including covariates, leaf regression bases, and case weights |
| tracker | Tracking data structures that speed up sampler operations, synchronized with active_forest tracking a forest's state |
| residual | Data object containing the "partial" residual net of all the model's other mean terms, aside from tree |
| tree | Tree to be updated |
| tree_num | Integer index of tree to be updated |
| global_variance | Value of the global error variance parameter |
| gen | C++ random number generator |
|
inline |
Set a new value for the leaf node scale parameter.
| tau | Leaf node prior scale parameter |