Package: stackr 0.1.0

Nikos Bosse

stackr: Create Mixture Models From Predictive Samples

The `stackr` package provides an easy way to combine predictions from individual time series or panel data models to an ensemble. `stackr` stacks (Yuling Yao, Aki Vehtari, Daniel Simpson, and Andrew Gelman (2018) <doi:10.1214/17-BA1091>) Models according to the Continuous Ranked Probability Score (CRPS) (Tilmann Gneiting & Adrian E Raftery (2007) <doi:10.1198/016214506000001437>) over k-step ahead predictions. It is therefore especially suited for timeseries and panel data. A function for leave-one-out CRPS may be added in the future. Predictions need to be predictive distributions represented by predictive samples. Usually, these will be sets of posterior predictive simulation draws generated by an MCMC algorithm. Given some training data with true observed values as well as predictive samples generated from different models, `crps_weights` finds the optimal (in the sense of minimizing expected cross-validation predictive error) weights to form an ensemble from these models. Using these weights, `mixture_from_samples` can then provide samples from the optimal model mixture by drawing from the predictice samples of the individual models in the correct proportion. This gives a mixture model solely based on predictive samples and is in this regard superior to other ensembling techniques like Bayesian Model Averaging.

Authors:Nikos Bosse [aut, cre], Yuling Yao [aut], Sam Abbott [aut], Sebastian Funk [aut]

stackr_0.1.0.tar.gz
stackr_0.1.0.zip(r-4.5)stackr_0.1.0.zip(r-4.4)stackr_0.1.0.zip(r-4.3)
stackr_0.1.0.tgz(r-4.4-arm64)stackr_0.1.0.tgz(r-4.3-arm64)
stackr_0.1.0.tar.gz(r-4.5-noble)stackr_0.1.0.tar.gz(r-4.4-noble)
stackr.pdf |stackr.html
stackr/json (API)
NEWS

# Install 'stackr' in R:
install.packages('stackr', repos = c('https://epiforecasts.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/epiforecasts/stackr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

    On CRAN:

    crpsensemblesforecastingstacking

    4.25 score 4 stars 44 scripts 2 exports 54 dependencies

    Last updated 20 days agofrom:6ac296722f (on v0.1.0). Checks:OK: 1 NOTE: 6. Indexed: yes.

    TargetResultDate
    Doc / VignettesOKNov 02 2024
    R-4.5-win-x86_64NOTENov 02 2024
    R-4.5-linux-x86_64NOTENov 02 2024
    R-4.4-win-x86_64NOTENov 02 2024
    R-4.4-mac-aarch64NOTENov 02 2024
    R-4.3-win-x86_64NOTENov 02 2024
    R-4.3-mac-aarch64NOTENov 02 2024

    Exports:crps_weightsmixture_from_samples

    Dependencies:abindbackportsBHcallrcheckmateclicolorspacedata.tabledescdistributionalfansifarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsscalesStanHeaderstensorAtibbleutf8vctrsviridisLitewithr

    stackr

    Rendered fromstackr.Rmdusingknitr::rmarkdownon Nov 02 2024.

    Last update: 2024-10-31
    Started: 2023-07-18