Repository navigation
Add model_information: held-out lower bound on I(M;Y) from posterior model probabilities (#238) - #239
Merged
Merged
Conversation
… model probabilities A stratified estimate of H(M) + E[log q(M | Y)] over independent replicates, with a normal-approximation interval, per-structure scores, failed replicates kept (failed='prior' counts them as zero information), and the probability floor reported. Closes #238.
Collaborator
Author
|
Independent review (read-only agent): approve with edits. Edits applied in the last commit (all-failed-stratum note in the docstring and docs, edge-case tests for an all-failed stratum, a one-hot prior, float32 input and a 1-D posterior; calibration wording). CI green on all jobs. Merging. |
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 #238.
What
trade_study.information:model_information,ModelInformation,TruthScore. From the posterior model probabilities that any reader assigns on held-out replicates it returns a lower bound on the mutual informationI(M; Y)between the generating structure and the data:I(M; Y) >= H(M) + E[log q(M | Y)], the gap beingE_Y KL(p(M | Y) || q(M | Y)) >= 0.The estimator is stratified by structure,
H(pi) + sum_m pi_m * mean_{i: truth_i = m} log q_i(m), so the number of replicates per structure may differ from the prior; its standard error issqrt(sum_m pi_m^2 s_m^2 / n_m)with a normal-approximation interval (stdlibNormalDist, no new dependency). Also returned:H(M), the fraction of prior entropy resolved, and per-structure mean log score and mean probability of the truth.Scientific conditions (in the docstring and
docs/api/information.md)I(M; Y).failed="prior", which replaces the row by the prior (zero information). A partly missing row is refused.flooris raised to it and counted inn_floored; this is optimistic (a zero would give-inf), so any count is a warning.Validation
H(M)(one bit for two equal structures).Y | A ~ N(-mu, 1),Y | B ~ N(+mu, 1)) where the exact posterior is a sigmoid andI(M; Y)is computed by quadrature: with the exact posterior the estimate is within 4 standard errors of the quadrature value (balanced and 3:1 unbalanced replicates); tempered readers (0.3 and 3.0) give intervals entirely below it.just cipasses locally: lint,mypy --strict, 1141 tests, coverage 94.9%.Not in this PR
Reliability of the model posterior, a nested Monte Carlo EIG estimator, Bayes-factor design analysis and the link to #217 are listed in #238 as later phases.