CALM
Calibrated Menopausal-status benchmark — an open, reproducible benchmark for predicting menopausal status from routine, low-cost health markers.
0.1.5 · Python 3.14 · uv · MIT
CALM provides a rigorously specified benchmark for: premenopausal vs. postmenopausal from routine markers (labs, body measures, demographics), with calibrated confidence, an explicit no-call option, honest generalization reporting, and end-to-end provenance. It is a benchmark engine — a library and CLI — not an application. It emits versioned, auditable artifacts that downstream tools consume.
Out-of-training-range inputs are always withheld. This is documented univariate range checking rather than a claim of multivariate novelty detection.
Reported metrics include deterministic bootstrap confidence intervals. Synthetic runs are explicitly exploratory; the default real-data protocol is within-cycle frozen-test evaluation, not external validation.
Install
Requires Python 3.14 and uv.
After the first PyPI release:
uv tool install calm-benchmark
calm-benchmark --help
For development from source:
git clone <repo> && cd calm
uv sync
uv run calm-benchmark --help
Quickstart
# run the deterministic, offline benchmark demonstration
uv run calm-benchmark demo --output runs
The demo writes, under runs/synthetic-demo/, metrics.json, a reliability plot, a benchmark card, and
a complete manifest.json.
Pinned public NHANES run
The public 2017–2018 run consumes the official XPT files already downloaded to data/raw/, verifies
their SHA-256 hashes, validates the cycle schema, and records source URLs and checksums in its manifest.
uv run calm-benchmark run-nhanes --config configs/default.toml --run-id nhanes-2017-2018
It uses the versioned public_cessation outcome: RHQ031 and RHD043 distinguish reported current
periods from menopause/change-of-life cessation and exclude reported hysterectomy. Public data redact
pregnancy and hysterectomy information for women aged 45 and older, so this run does not claim to
exclude surgical menopause in that age band. An RDC-only natural-menopause variant is outside this
public benchmark.
Attribution and optional explanations
Each benchmark run emits attributions.json: deterministic, per-prediction feature-association scores
with model-hash provenance. They describe association under a fixed reference replacement, not cause.
The optional OpenAI explanation service lives in services/explainer/; it receives only a versioned CALM
hand-off and refuses withheld/OOD results, missing attributions, diagnosis, and treatment requests.
The benchmark contract
- Task — binary premenopausal vs. postmenopausal (optional secondary: early natural menopause).
- Split — deterministic, stratified, content-hashed; the hash is the no-leakage proof.
- Metrics — balanced accuracy, per-class recall, F1, AUROC, PR-AUC, Brier and reliability, no-call rate, bootstrap confidence intervals, and subgroup breakdowns with denominators and eligibility.
See DESIGN.md for the full specification and domain rationale.
Reproducibility & provenance
Every artifact carries a Provenance record (normalized-config hash, input hashes, tool and git
versions). Re-running the same config against the same pinned inputs yields identical hashes. NHANES
public-use data are U.S. public domain; the NCHS Data User Agreement notice is preserved in exports.
Architecture at a glance
src/calm/
├── config/ # pydantic schemas + loading
├── domain/ # entities, value objects, invariants, registries (pure — no I/O)
├── ports/ # Protocol interfaces
├── adapters/ # NHANES source, synthetic source, codebook parsing
├── pipeline/ # acquire ingest cohort labels features split train calibrate evaluate report
├── orchestration/ # instrumented runner, run manifest
├── observability/ # logging, timing, hashing, provenance
└── cli.py # Typer app
Full details in DESIGN.md. The AI-agent build process is governed by AGENT.md; the roadmap lives in
TODOS.md.
Extending CALM
- New cycle — add a
CycleSpecin config. - New label rule / outcome — implement and register a
LabelRule. - New data source — implement the
DataSourceport. - New model or metric — register a factory.
Development
uv run ruff check && uv run ruff format --check
uv run mypy
uv run pytest --cov=calm
uv run pre-commit run -a
uv run mkdocs serve
Standards: full type hints, Google-style docstrings on the public API, no superfluous comments, unit tests required, property-based tests for pipeline invariants, and a coverage gate on the core.
Contributing
See AGENT.md for engineering conventions and TODOS.md for the roadmap. Pull requests must pass all
gates and include tests and a CHANGELOG.md entry.
Versioning & changelog
Semantic Versioning; history in CHANGELOG.md (Keep a Changelog).
License & disclaimer
MIT. Research benchmark, not a medical device. CALM produces population-derived predictions for methodological research and must not be used for clinical or diagnostic decisions.
Citation
CALM: A Calibrated Benchmark for Menopausal-status Prediction from Routine Health Markers. <year>. <repo>.
Metadata
Release files for calm-benchmark 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calm_benchmark-0.1.5.tar.gz | 182.5 kB | Without provenance | Details for calm_benchmark-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calm_benchmark-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for calm_benchmark-0.1.5-py3-none-any.whl |
Total release size: 230.3 kB
Release files / calm_benchmark-0.1.5.tar.gz
| Download URL | calm_benchmark-0.1.5.tar.gz |
|---|---|
| Size | 182.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1c5239fbb18f07fba2320715d396d65325b728f9c49d2a9b63d296e5d965a4c
|
|
BLAKE2b-256 checksum How to use checksums |
547b38ace774ed0f93647c3ba5e6a62280eec922784fb38016e41d1f7e0d9bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / calm_benchmark-0.1.5-py3-none-any.whl
| Download URL | calm_benchmark-0.1.5-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4dbaa6a1ab0c5ded486965b8dced5a5b518c0d8d0b1022b8fae978d5d38228cd
|
|
BLAKE2b-256 checksum How to use checksums |
13f96abd09a9a86ef15029c5f283a76eb226f64c59247c56febf053cd499e781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for calm-benchmark 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.