ModelConfidenceSetSelection#
- class cultivars.forecast.confidence_set.ModelConfidenceSetSelection(*, names, pvalues, mean_losses, elimination_order, alpha, statistic, n_bootstrap, block_length, nobs)[source]#
The model confidence set: the forecasters not shown to be worse than the best.
Hansen, Lunde and Nason (2011): a set that contains the best model with probability at least \(1 - \alpha\), reached by eliminating the worst model while the equivalence of the remaining ones is rejected. Like a confidence interval it is honest about what the data can and cannot separate: a short or noisy evaluation window keeps many models, and that is the finding, not a failure.
- Variables:
names (
tuple[str,...]) – Model labels, in the order the losses were given.pvalues (
NDArray[double]) –(M,)MCS p-values; a model is in the set at levelalphaexactly when its p-value is at leastalpha.mean_losses (
NDArray[double]) –(M,)mean loss of each model.elimination_order (
tuple[int,...]) – Model indices from first eliminated to the survivor.alpha (
float) – Level of the set.statistic (
str) –"range"or"max".n_bootstrap (
int) – Bootstrap replications.block_length (
float) – Expected block length of the stationary bootstrap.nobs (
int) – Evaluation origins.
See also
ModelConfidenceSetSelection– the public name of this class.model_confidence_set()– returns an instance.
Attributes#
Model labels, in the order the losses were given. |
|
MCS p-values, |
|
Mean loss of each model over the evaluation origins, |
|
Model indices from the first eliminated to the survivor. |
|
Level of the set; it contains the best model with probability at least \(1 - \alpha\). |
|
Equivalence statistic used, |
|
Bootstrap replications behind the p-values. |
|
Expected block length of the stationary bootstrap. |
|
Number of evaluation origins. |
|
The survivor of the elimination sequence. |
|
The models eliminated, in elimination order. |
|
The models in the set, best mean loss first. |