Repository navigation
examples: add the IMPROVE neoepitope immunogenicity cohort - #1
Merged
Merged
Conversation
Before: predval's example cohorts were a clinical risk score (GUSTO-I) and an imaging classifier roster (PCam). Neither exercised the harness at the extreme class imbalance and small-cluster-count shape that budget-constrained selection problems have, and the neoantigen immunogenicity literature reports ranking metrics only, so there was nothing to point at. After: a third example cohort reads the out-of-fold predictions released with Borch et al. 2024 (github.com/SRHgroup/IMPROVE_paper) -- 17,520 candidate neoepitopes from 70 patients, 467 experimentally immunogenic (2.666% prevalence), seven models -- and evaluates them with the patient as the unit of independence. The cross-validation behind those predictions was partitioned by patient, which build_fixture.py verifies rather than assumes; that is what makes the file admissible as a predictions-only input instead of an apparent-fit artefact. Two subgroups are prespecified in cohort.yaml: the release's three accrual cohorts, as the closest available proxy for transfer to another indication, and 9-mers versus other lengths, where a fault is expected a priori. How: examples/improve/build_fixture.py assembles cohort.parquet and predictions.parquet from the released archive (including the NNAlign comparator, whose header line crams five field names into one tab-delimited cell); run_evaluation.py is the standard end-to-end evaluation with a prevalence anchoring block added ahead of discrimination; budget_yield.py is a sidecar, outside predval's contract, that scores each patient's own top-k candidates for k in 3, 5, 10, 20 and reports observed yield against the yield the published probabilities promise over that identical set. Library code is untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138yQfFhvnVRHd1XhTEz54w
aRealGem
pushed a commit
that referenced
this pull request
Oct 7, 2026
The IMPROVE example landed in #1 with scripts only; no run output was committed. This freezes a B=2000 run built from the public IMPROVE_paper release (commit c670942, results.zip sha256 2689700...) as a golden baseline, adds the opt-in regression test matching the GUSTO and PCam ones, and publishes the report under docs/reports/. A second independent run reproduced every artefact byte-for-byte (findings.json modulo provenance.git_commit). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E5Q2q7a7gF1tUX8y6fRV7m
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.
Requested by Precious · project thread
Before: predval shipped two example cohorts — a clinical risk score (GUSTO-I) and an imaging classifier roster (PCam). Neither exercised the harness at the shape that budget-constrained selection problems have: 2.7% prevalence, 70 independent units, and 250 correlated observations inside each one. The neoantigen immunogenicity literature reports ranking metrics only, so there was no worked example of what the harness has to say about that kind of model.
After: a third example cohort reads the out-of-fold predictions released with Borch et al. 2024 (
github.com/SRHgroup/IMPROVE_paper) — 17,520 candidate neoepitopes from 70 patients, 467 experimentally immunogenic, seven models — and evaluates them with the patient as the unit of independence. Library code is untouched; this is an example directory, a.gitignoreentry for its regenerable parquets, and nothing else.The cross-validation behind those predictions was partitioned by patient.
build_fixture.pyverifies that rather than assuming it, which is what makes the file admissible as a predictions-only input instead of an apparent-fit artefact. Two subgroups are prespecified incohort.yaml: the release's three accrual cohorts, as the closest available proxy for transfer to another indication, and 9-mers versus other lengths, where a fault would be expected a priori.What the run produces is in
examples/improve/README.md. In short: six of the seven models carry a large intercept-only miscalibration that predval's rung1 repairs with a cross-fitted, interval-backed gain; the seventh comes back not miscalibrated, with rung3 flagged as reliably harmful, so the harness declines to recalibrate it. That is a second independent instance of the refuse-to-manufacture-a-gain behaviour the PCam fixture demonstrates, on a model class the harness was not designed around.How:
build_fixture.pyassemblescohort.parquetandpredictions.parquetfrom the released archive, including the NNAlign comparator — whose header line crams five field names into one tab-delimited cell, so the identifiers are read off the index levels rather than the header.run_evaluation.pyis the standard end-to-end evaluation with a prevalence-anchoring block added ahead of discrimination.budget_yield.pyis a sidecar, explicitly outside predval's contract, that scores each patient's own top-k candidates for k ∈ {3, 5, 10, 20} and reports observed yield against the yield the published probabilities promise over that identical set — so the gap is miscalibration rather than ranking error. It reuses predval's own cross-fitting helper rather than reimplementing it.Checks: 232 tests pass (2 skipped),
ruff checkandruff format --checkclean on the new directory.🤖 Generated with Claude Code
https://claude.ai/code/session_0138yQfFhvnVRHd1XhTEz54w
Generated by Claude Code