Package: stackr 0.1.0
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:
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')) |
Bug tracker:https://github.com/epiforecasts/stackr/issues
crpsensemblesforecastingstacking
Last updated 20 days agofrom:6ac296722f (on v0.1.0). Checks:OK: 1 NOTE: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 02 2024 |
R-4.5-win-x86_64 | NOTE | Nov 02 2024 |
R-4.5-linux-x86_64 | NOTE | Nov 02 2024 |
R-4.4-win-x86_64 | NOTE | Nov 02 2024 |
R-4.4-mac-aarch64 | NOTE | Nov 02 2024 |
R-4.3-win-x86_64 | NOTE | Nov 02 2024 |
R-4.3-mac-aarch64 | NOTE | Nov 02 2024 |
Exports:crps_weightsmixture_from_samples
Dependencies:abindbackportsBHcallrcheckmateclicolorspacedata.tabledescdistributionalfansifarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvmunsellnlmenumDerivpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanrstantoolsscalesStanHeaderstensorAtibbleutf8vctrsviridisLitewithr
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Obtain CRPS stacking weights | crps_weights |
Make mixture model from predictive samples | mixture_from_samples |