Dependence aware tests for ppc_loo_pit_ecdf#428
Open
florence-bockting wants to merge 73 commits intostan-dev:masterfrom
Open
Dependence aware tests for ppc_loo_pit_ecdf#428florence-bockting wants to merge 73 commits intostan-dev:masterfrom
ppc_loo_pit_ecdf#428florence-bockting wants to merge 73 commits intostan-dev:masterfrom
Conversation
…improve input validation checks
…e-bockting/bayesplot-private into dependence-aware-LOO-PIT
ppc_loo_pit_ecdf
5 tasks
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #428 +/- ##
==========================================
+ Coverage 98.66% 98.70% +0.03%
==========================================
Files 35 35
Lines 5860 6028 +168
==========================================
+ Hits 5782 5950 +168
Misses 78 78 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
I'm seeing the failure on R-devel outside of this PR too (there seem to be some tiny insignificant differences to the SVGs on r-devel, which has happened before). I haven't seen the Mac failure on r-release before, but it's possible it's not due to this PR. We'd need to check that one more closely. |
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.
Description
Context
LOO-PIT is used for model checking within the Bayesian workflow. The LOO-PIT values are asymptotically uniform (for continuous data) if the model is calibrated. Within this approach, each data point is iteratively held out; the model is then conditioned on the remaining data and the corresponding LOO predictive distribution is compared to the held-out point to test for departures from uniformity. A corresponding graphical uniformity test was developed by Säilynoja et al. (2022) and is implemented in the
ppc_loo_pit_ecdffunction in the bayesplot package. This function visualizes the empirical cumulative distribution function (ECDF) of the LOO-PITs, overlaid with simultaneous confidence intervals (creating an envelope) for a standard uniform sample.Issue
The current approach assumes independence of LOO-PIT values which is not valid (Marhunenda et al., 2005). The corresponding graphical test yields an envelope that is too wide, reducing the test's ability to reveal model miscalibration.
Suggested solution (Content of this PR)
Tesso & Vehtari (2026, see preprint) propose three testing procedures that can handle any dependent uniform values and provide an updated graphical representation that uses color coding to indicate influential regions or most influential points of the ECDF. This PR implements the new development, by replacing the current
ppc_loo_pit_ecdfimplementation.TODOs
ppc_loo_pit_ecdf()function inppc-loo.Rhelpers-ppc.Rtest-helpers-ppc.Randtest-ppc-loo.Rppc_loo_pit_ecdf()intest-ppc-loo.Rmethodargumentmethodargument