Skip to content

Add short-series sampling and band scripts. - #119

Merged
cnicholas merged 1 commit into
cnicholas:mainfrom
rabujamra:rabujamra-patch-1
Sep 10, 2026
Merged

Add short-series sampling and band scripts.#119
cnicholas merged 1 commit into
cnicholas:mainfrom
rabujamra:rabujamra-patch-1

Conversation

@rabujamra

Copy link
Copy Markdown
Contributor

Adds the two reproducibility scripts from #114: the original short-series sampling study and the n=3–30 band extension. No library behavior or methodology is changed.

Summary

  • What: Adds validation/short_series_sampling.py and validation/short_series_bands.py.
  • Why: Preserves the reproducibility work from Series length (T) as an axis in design-state admissibility — and a saturation question #114 in the repository and supplies the extended n=3–30 sampling table requested for the short-series methodology discussion.
  • Scope: Validation/reproducibility only. No package code, public API, estimator, design-state logic, or chart-selection behavior is changed.

Contract / invariants

Check the ones this change had to keep true. Anything you cannot check, explain below.

  • Defaults unchanged — existing calls produce equivalent results
  • Residuals unaffected — no residual or design-state recomputation
  • Row/index alignment preserved — output row count and ordering unchanged
  • Output schema compatible — column names/types and the stats-dict shape
    ({N, center, lpl, upl}) still hold
  • Pinned error strings unchanged — or the tests that pin them are updated
    deliberately, and the commit says why

These invariants are not exercised by this PR because it adds standalone
validation/reproducibility scripts only and does not modify package code.

Behaviour changes

None. Validation/reproducibility scripts only.

Methodology

  • No methodology change — implementation, ergonomics, or docs only
  • Methodology change, validated against Bishop's reference data
    (cite the chapter/equation/table)

Tests

  • pytest tests/ -m "not slow"
  • ruff check .
  • mypy processbehavior (advisory — no new errors)
  • Golden masters regenerated deliberately, if the diff touches them

Manual validation:

Notes

The scripts intentionally do not propose an adequacy criterion or band edge. They provide the sampling arithmetic for the maintainers' methodology discussion.

Adds the two reproducibility scripts from cnicholas#114: the original short-series sampling study and the n=3–30 band extension.

@cnicholas cnicholas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally against the 0.2.1 wheel: short_series_sampling.py reproduces every number in #114 and short_series_bands.py reproduces the n=3–30 table, with its own agreement check against the original within Monte Carlo error. Self-contained, reads d2 from the library, not wired into CI by design.

@cnicholas
cnicholas merged commit 3086ad8 into cnicholas:main Sep 10, 2026
17 checks passed
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