Return a data.frame from loo_compare() for subsampled loo objects - #393
Draft
florence-bockting wants to merge 2 commits into
Draft
Return a data.frame from loo_compare() for subsampled loo objects#393florence-bockting wants to merge 2 commits into
florence-bockting wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix-subsampling #393 +/- ##
===================================================
+ Coverage 92.86% 92.87% +0.01%
===================================================
Files 31 31
Lines 3041 3046 +5
===================================================
+ Hits 2824 2829 +5
Misses 217 217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 8a8f767 is merged into master:
|
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.
Closes #392
What
loo_compare()returns a matrix for subsampled loo objects, but a data.framefor all other loo objects. This PR aligns the two.
loo_compare.psis_loo_ss_list()now builds the same structure asloo_compare()inR/loo_compare.R.Output
Before:
After:
Breaking change
Code that indexes the result by position breaks.
comp[, 1]now returns themodel names. Use
comp$elpd_diff. Code that readsrownames(comp)alsobreaks. Use
comp$model.Checks
devtools::test(filter = "loo_subsampling")passes.tests/testthat/_snaps/loo_subsampling_cases.mdupdated.vignettes/loo2-large-data.Rmdoutput blocks updated.AI assistance
I used AI assistance while working on this PR. I have reviewed all changes.