ModelCombinationSelection#
- class cultivars.bayes.combination.ModelCombinationSelection(*, names, weights, method, scores, results, n_origins=0, notes=())[source]#
Weights over models and the mixture predictive they imply.
The record behind both routes to a combination: posterior model probabilities from marginal likelihoods (Bayesian model averaging) and log-score-optimal weights from held-out predictive densities (stacking). Whatever produced the weights, prediction is the same act – draw a model in proportion to its weight, then one of its predictive paths – so the two share this object and differ only in
methodand in whatscoresholds.- Variables:
weights (
NDArray[double]) –(M,)non-negative weights summing to one.method (
str) –"bayesian model average"or"stacking".scores (
NDArray[double]) –(M,)the per-model number the weights came from – log marginal likelihoods for averaging, mean held-out log predictive densities for stacking.results (
tuple[PredictiveResult,...]) – The fitted results, each exposingforecast_paths.n_origins (
int) – Evaluation origins behind stacking weights;0for averaging.
See also
ModelCombinationSelection– the public name of this class.bayesian_model_average()– returns an instance.stacking()– returns an instance.
Attributes#
Model labels, aligned with |
|
Non-negative model weights summing to one, |
|
How the weights were formed, |
|
The per-model number the weights came from, |
|
The fitted results, each exposing |
|
Evaluation origins behind stacking weights; |
|
Caveats that qualify the weights, shown under the summary table. |
|
Models combined. |
Methods#
|
The mixture predictive's |
|
Draws from the mixture predictive, one model per draw. |
|
Weights and the number each came from, heaviest first. |