Repository navigation
Make held-out confirmation respect groups and test more comparisons - #152
Merged
Merged
Conversation
…arison A review of an explore run on a table with several rows per source item found that the held-out check was weaker than it looked. This addresses the points that held up against the code. Rows that share a group - split_records / _split_records take group_col and keep each group on one side. A row-level split left most held-out rows in groups the explorer had already seen. - evalrx.stats.weighted_bootstrap resamples whole clusters for any statistic written over row weights. compare(paired=False) accepts cluster_by=(groups_a, groups_b); a flat sequence is still ignored there. - A two_group sufficient statistic may carry clusters_a / clusters_b. - The profile takes explicit group and time columns, recognises calendar names and ISO dates as time, suggests columns that look like a grouping unit (many values, repeats, high intraclass correlation) and flags columns that almost fully determine the outcome. Held-out comparisons - Recipes gain where, design (stratified with strata, did with a modifier, dose_response with fixed bins) and expect (>, <, abs< a bound, nonzero). abs< states a control: it holds only when the whole interval is inside the bound. A numeric outcome is compared by mean. - Every claim, one per signal and one per hypothesis prediction, enters one Benjamini-Hochberg family. reject means the claim survived; raw_reject keeps the uncorrected verdict. In-sample two_group candidates get a p-value and a BH family too. adjudication.method names the correction applied and is "none" for an empty family. - A binary two-group comparison with independent rows takes its p-value from the exact test: the bootstrap degenerates on small, cleanly separated samples. - No recipe expression may read the outcome column, whatever its name. - Signals whose claim holds list representative rows near each side's median. Hypotheses - A hypothesis may carry numeric predictions about named signals, which the host checks without a model, and a four-field experiment plan in place of free text. Explore run - --group-col, --time-col, --text-col (keyword recipes chosen on the exploration half and re-tested on the other), --data-card and its four flags, --judge-backend (default: the explorer's backend; the judge was fixed to the Claude CLI), --keep-sandbox. - A load that drops rows at --max-rows says how many. The temporary sandbox, which holds a copy of the data, is deleted once artifacts are written. - The report records whether the judge is the model that proposed the hypotheses. Behaviour changes: held-out and in-sample two-group verdicts are now corrected for multiplicity, so some that passed alone no longer do; --judge-model no longer defaults to a Claude model on other backends; compare(paired=False) reports "two-sample bootstrap (unpaired)" when no clusters are given. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoBWQhSUCKmU2rGbRh5ALP
docs/holdout_confirmation.md explains the group column, the recipe designs, stated expectations, the single correction family, host-checked predictions, keyword recipes and the data card, and lists what the method cannot do. tools/check_holdout_calibration.py simulates data with a known answer; docs/validation/holdout_calibration_20261121.md records its output. With a flag that has no effect and varies by group, treating rows as independent rejected in 22.3% of datasets and using the group column in 7.5%, against a 5% target. Interval coverage was 93.2% to 96.3% across the four designs. Where the method misses, it misses on the permissive side. README: mention --holdout-confirm and --group-col, and call the L4 option a weight-space edit. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoBWQhSUCKmU2rGbRh5ALP
main moved on by 22 commits (PR #151). The only conflict was CHANGELOG.md, where both sides added entries under Unreleased; both sets are kept. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoBWQhSUCKmU2rGbRh5ALP
… p-values Found by running the command line on files on disk with no coding agent installed. - Keyword recipes come from the host, not the agent. They were dropped when the exploration failed, so the run printed "froze 5 keyword recipes" and then confirmed nothing. They are now kept and re-tested. - adjudication.p_values said "percentile bootstrap" for every held-out family, including ones whose p-values came from the exact test. It now lists the tests that were used. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoBWQhSUCKmU2rGbRh5ALP
xxlya
requested review from
Nanboy-Ronan,
evalvitals and
jiaq-liu
as code owners
November 22, 2026 01:07
jiaq-liu
approved these changes
Nov 22, 2026
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.
Integrates the points from a review of an explore run on a table with several
rows per source item. Each point was checked against the code first.
Added
--group-col: keeps each group on one side of the held-out split andresamples whole groups for held-out intervals. Suggests a group column
from the data when none is named.
where, stratified, difference in differences, fixed-bindose-response, and
expect(includingabs<for controls). Numericoutcomes are supported.
experiment plan.
--time-col,--text-colkeyword recipes.docs/holdout_confirmation.md. Calibration:docs/validation/holdout_calibration_20261121.md.Behaviour changes
are corrected too. Some verdicts that passed alone no longer do
(
examples/m2_m3/deco_hallu_explore/test_hypotheses.pygets stricter).adjudication.methodnames the correction applied (nonewhen empty).--backend;--judge-modelno longer defaultsto a Claude model on other backends.
--max-rowstruncation is reported; the temp sandbox is deleted afterartifacts are written.
Verification
test_dynamic_api_filters_and_serves_spa,which fails the same way on main without the report UI bundle).
positives treating rows as independent vs 7.5% with the group column
(target 5%). Where the method misses, it misses on the permissive side.
Not covered
and the explorer, hypothesis and judge prompts changed.
confirm_report.jsonfields.