Create new kfold.print method#342
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #342 +/- ##
==========================================
+ Coverage 92.78% 92.80% +0.02%
==========================================
Files 31 31
Lines 2992 3004 +12
==========================================
+ Hits 2776 2788 +12
Misses 216 216 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The current behavior shows the following: If all pareto-k are acceptable: If some pareto-k are problematic: If no pareto-k diagnostics exist in kfold output structure: As we have only pareto-k information in the diagnostics the |
|
I don't really understand what the issue with the failing R-CMD-check for ubuntu-latest is. Do you have any idea what the problem on my side can be? |
Or we could add the pointwise ESS's to diagnostics |
I think there's a bug in r-devel. I'm seeing this with cmdstanr too. I bet it will be fixed soon. |
tests/testthat/test_print_plot.R
Outdated
| test_that("print.loo supports kfold with pareto-k diagnostics - calibrated", { | ||
| kfold1 <- readRDS("data-for-tests/kfold-calibrated.Rds") | ||
|
|
||
| expect_output(print(kfold1), "All Pareto k estimates are good") |
There was a problem hiding this comment.
Could we use expect_snapshot here to test the entire output since it should be deterministic, right? Same with the others below. I know that the existing print tests don't do that, but they were written a long time ago and maybe we should update them to do that too? (not in this PR but at some point)
Description
In
brms(PR#1869), we updated thekfoldfunction such that it now also returns pareto-k diagnostics.This PR suggests a new
kfold.printmethod that prints additionally to theloo.printoutput information about pareto-k diagnostics.TODO
kfold.printmethod to support pareto-k diagnostics if they existkfold.printreduces toloo.printif nodiagnostics$pareto_kin kfold object exists