Repository navigation
Adding pred_measure feature - #363
Draft
florence-bockting wants to merge 185 commits into
Draft
florence-bockting wants to merge 185 commits into
florence-bockting wants to merge 185 commits into
Conversation
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if de81c46 is merged into loo-v3.0.0:
|
This was referenced Jun 8, 2026
Contributor
Author
|
There is an open issue requesting a subset() method for psis objects #343 and an (unrelated) open PR #110. Might be worth considering whether we can address this as well in this refactoring PR. If yes, we should
Moved this to PR #379 |
Closed
6 tasks
pred_measure feature
added 20 commits
July 2, 2026 09:16
Introduce `model_compare()` for model comparison with support of new predictive measures
Contributor
Author
Overview of changesItems marked (#380) come from the merged User-facing functions
Internal functionsNew in #363
From #380
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #281
Fixes #223, #213, #201, #135, #220
Summary
This PR adds a predictive performance API. It computes density scores, scoring rules, and point-prediction metrics under four evaluation sources: in-sample, PSIS-LOO, k-fold, and holdout (test data).
insample_pred_measure(),loo_pred_measure(),kfold_pred_measure(),test_pred_measure(), andpred_measure().measure_*().supported_measures_list()lists them.measure_rps()andmeasure_srps()use oneypreddraw matrix and a PWM estimator ((loo_)(s)crps could ask for only one argument with predictions #223).loo_pred_measure()accepts a pre-computedpsis_object(loo_predictive_metric and loo_crps could accept psis objects to reduce computation #213).model_compare()compares models on all measures (loo_compare for crps and loo_crps #220). It comes from Introducemodel_compare()for model comparison with support of new predictive measures #380, which is merged into this branch.elpd(),crps(),scrps(),loo_crps(),loo_scrps(),loo_predictive_metric(), andloo_compare()are deprecated. They still work with their current APIs.The comment below lists all new features and functions. It marks the parts that come from #380.
How to navigate this PR
notes/developer-notes.md: status, design decisions, numerical comparisonsnotes/design-discussions/model_compare.md: review decisions formodel_compare()(Introducemodel_compare()for model comparison with support of new predictive measures #380)vignettes/articles-online-only/overview-measures.Rmd: supported measures and their definitionsvignettes/articles-online-only/pred-measure-workflow.Rmd: end-to-end workflowvignettes/articles-online-only/model-comparison.Rmd: Model comparison: Explanation ofmodel_compare()(Introducemodel_compare()for model comparison with support of new predictive measures #380)vignettes/migration-guide.Rmd: deprecated functions and their replacementsDeprecations (implementations retained)
elpd()measure_elpd()/*_pred_measure()crps(),scrps()(x,x2)measure_rps(),measure_srps()(ypred)loo_crps(),loo_scrps()loo_pred_measure(..., measure = "rps" | "srps")loo_predictive_metric()loo_pred_measure()loo_compare()(#380)model_compare()Each deprecated function warns once per session.
Dependencies
Vignettes, test-data generation, and pkgdown CI install brms from GitHub
masteras k-fold support for categorical models (brms#1890) is not yet on CRAN. Remove the pin after the next brms CRAN release.Known limitations
group_idsgrouping is not implemented.Acknowledgements
This work builds on a prototype by @VisruthSK (VisruthSK/loo-sandbox) under guidance from @jgabry.