sampler.GlobalVarianceModel

sampler.GlobalVarianceModel()

Wrapper around methods / functions for sampling a “global” error variance model with inverse gamma prior.

Methods

Name Description
sample_one_iteration Sample one iteration of a global error variance parameter

sample_one_iteration

sampler.GlobalVarianceModel.sample_one_iteration(residual, rng, a, b)

Sample one iteration of a global error variance parameter

Parameters

Name Type Description Default
residual Residual stochtree object storing continuously updated partial / full residual required
rng RNG stochtree object storing C++ random number generator to be used sampling algorithm required
a float Shape parameter for the inverse gamma error variance model required
b float Scale parameter for the inverse gamma error variance model required

Returns

Name Type Description
float One draw from a Gibbs sampler for the error variance model, which depends on the rest of the model only through the “full” residual stored in a Residual object (net of predictions of any mean term such as a forest or an additive parametric fixed / random effect term).