models.StackingFit

Posterior stacking weights, from BayesStacking.fit or

Usage

models.StackingFit()

Attributes

Name Description
alpha_draws Intercept draws (the logits for Bayesian stacking), one row per draw,
beta_draws Slope draws, flattened draw by draw, model by model, covariate by
divergences Divergent transitions among the kept draws.

alpha_draws

Intercept draws (the logits for Bayesian stacking), one row per draw,

alpha_draws: list[float]

one per model but the reference (last).


beta_draws

Slope draws, flattened draw by draw, model by model, covariate by

beta_draws: list[float]

covariate.


divergences

Divergent transitions among the kept draws.

divergences: int

Methods

Name Description
rhat_ess() R-hat and bulk ESS of each sampled parameter.
weights() Posterior mean weights: one row per observation of covariates

rhat_ess()

R-hat and bulk ESS of each sampled parameter.

Usage

rhat_ess()
Returns
list of (float, float)

weights()

Posterior mean weights: one row per observation of covariates

Usage

weights(covariates=None)

(one list per covariate), one weight per model. For Bayesian stacking leave covariates empty: one row.

Parameters
covariates: list of list of float = None
Returns
list of list of float