Skip to content

Nan reasons reweight test - #1

Merged
carlocamilloni merged 3 commits into
mainfrom
nan-reasons-reweight-test
Sep 18, 2026
Merged

carlocamilloni merged 3 commits into
mainfrom
nan-reasons-reweight-test

Conversation

@carlocamilloni

Copy link
Copy Markdown
Member

No description provided.

…g path

- summary.csv: geom_status, lag1_status, reweight_status, stitch_status explain
  every NaN (too_few_bins, too_few_pairs, constant_cycles, no_root, low_neff,
  cv_ge_1_at_lambda0, empty_pool, no_pass, ok_pool_fallback)
- lag-1 correlation no longer computed on constant input
- tests/synthetic.py + test_reweight_path.py: hand-built data where the weighted
  CV crosses 1, exercising finite lambda*, bootstrap CI, N_eff, KS at lambda*,
  and TSE weights (ratio c^3) end to end
- regtest: checks every NaN has a reason code and compares reason codes;
  reference regenerated (only the four status columns added, no value changes)
- README: status table and test description
- notebooks/demo.ipynb: attempts vs Q‡, reweighting weights/saturation/CV/N_eff,
  stitching and emergence of Poisson statistics, validation against a simulated
  higher barrier (foot vs top of the barrier), joint-mode checks; ipywidgets
  sliders when available, static figures otherwise (MAXCAL_DEMO_STATIC=1 for the
  committed, GitHub-readable copy)
- maxcal_poisson/maxcal_joint: set the Agg backend in main() instead of at
  import, so the modules can be imported in notebooks
- tests/test_notebook.py (slow): notebook executes top to bottom
- pyproject: 'demo' extra (jupyterlab, ipywidgets); notebook deps in 'test'
- CI runs the notebook test; README documents the demo
csv.writer defaults to CRLF, which made tests/regtest/reference_summary.csv
CRLF-terminated; git am strips CRs from patches by default, so patches touching
that file failed to apply.  All CSVs are now written with '\n', the reference
is regenerated (content unchanged apart from line endings), and .gitattributes
normalises text files to LF.
@carlocamilloni
carlocamilloni merged commit 9ee816f into main Sep 18, 2026
3 checks passed
@carlocamilloni
carlocamilloni deleted the nan-reasons-reweight-test branch September 18, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants