feat: inflate_cloud — fold surrogate error budget into predictive nulls - #84
Merged
Conversation
A deterministic surrogate (GBM emulator) produces an artificially tight, biased predictive null; scoring an observation against it charges the surrogate's approximation error as model misspecification. inflate_cloud convolves each observable's predictive with independent N(0, noise_sd), widening the null so a real conflict must exceed the surrogate error to be flagged. Widening-only: an error magnitude never licenses narrowing a null. Noise is injected in the space the error was measured (asinh(obs/scale) for GBM surrogates) and mapped back, so raw-space spread tracks each observable's magnitude. This is the qsp-inference half of redesign step 3c.
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.
The qsp-inference half of redesign step 3c (VPC null inflation).
inflate_cloud(cloud, noise_sd, *, asinh_scale=None)convolves each observable's predictive with independentN(0, noise_sd_j), widening the null by a known per-observable error budget. A deterministic GBM surrogate standing in for the QSP ODE produces an artificially tight, biased null; without this a real conflict cannot be told apart from surrogate approximation error, yielding falsestructural/over-dispersion labels. Folding the budget in makes any downstream discrepancy check (quantile_vpc,prediction_discrepancy) conservative wrt that error.asinh(obs/scale)for GBM surrogates) and mapped back, so raw-space spread tracks each observable's magnitude.pdac consumes this in
_vpop_observable_cloudto flip the emulator VPC verdict from descriptive-only to a real gate.