Reproduce the paper¶
Everything the paper reports is regenerated by notebooks under
publication/2_journal_article/notebooks/, which call the code in
publication/2_journal_article/paper/. The reference run is committed under
publication/2_journal_article/results/ with a manifest per stage (repository-relative
paths and SHA-256 hashes), so a re-run can be checked file by file.
Set up¶
python -m pip install -e .[dev,paper]
Checking a re-run¶
tests/test_paper_results.py verifies that every file named in results/manifests/ is on
disk with the recorded hash and that the M9 headline table equals the committed one:
pytest tests/test_paper_results.py -q
Show details
The figures and tables (minutes)¶
Two notebooks read results/ and write the manuscript's figures and tables to
results/paper/figures/ (PNG at 600 dpi and PDF) and results/paper/tables/ (CSV and
Markdown), and the supplementary ones to results/paper/supplementary/:
| notebook | writes |
|---|---|
paper_figures.ipynb |
one figure per cell, each show("fig05_two_hypotheses") from the registry in paper/figures.py |
paper_tables.ipynb |
one table per cell, each show("table02_headline") from paper/tables.py |
The manuscript entries (fig01 to fig12, table01 and table02) live in paper/manuscript.py,
drawn at the journal's column widths; adding one later is one function in the registry and
one cell.
The reference run (hours)¶
Five notebooks regenerate results/ in order; each has CONFIG in its first code cell and
states its inputs, outputs and runtime in its header.
| notebook | stage | writes | runtime |
|---|---|---|---|
01_data_and_folds |
population and the 18 station-held-out folds | results/01_data_folds/ |
seconds |
02_baselines_m7_m8 |
M7 rule, M8 trained per fold (nine fits) and predicted | results/02_baselines/ |
about 20 minutes |
03_m9 |
M9 scored and calibrated per fold | results/03_m9/ |
about two minutes |
04_outcomes_and_metrics |
reference terms, metrics, bootstrap, gate, operating points | results/04_metrics/ |
minutes |
05_gamma_forecasting |
the forecasting case study | results/05_gamma/ |
minutes |
The configuration is publication/2_journal_article/config/evaluation.yaml; it records the
dataset hashes, the fold rule, the settings of every method, the control and the gate. The
evaluation refuses to run on a dataset whose hash differs.
The M8 bundles (results/02_baselines/bundles/) are not committed; they are regenerated by
notebook 02 and their hashes recorded in the fold manifests.