NSchuetz's picture
Add/update forecasting bootstrap reference: README.md
32ab9a8 verified
|
Raw
History Blame Contribute Delete
3.32 kB
# Forecasting bootstrap reference
This subdir holds the **bootstrap reference** for the Track-3 (forecasting)
leaderboard recompute — the long-format per-draw frame that the skill / rank /
fairness CIs reduce from.
## Layout
```
forecasting/bootstrap/
├── draws.parquet # per-(reduction, model, scope, metric, draw) value
└── draws.meta.json # provenance: seed, n_boot, methods, baseline, git commit
```
## What's it for
Each row of `draws.parquet` is one bootstrap draw of one headline scope for one
method, for one of three reductions (`reduction` column):
- **skill** — paired skill score `S = 1 − exp(mean_task log R)` vs `seasonal_naive`,
per `(model, scope)` (scope = `channel_<i>_score`, `sleep_score`,
`workout_score`, `activity_score`, `physiology_score`, `overall_score`).
- **rank** — cross-method average rank, per `(model, scope, metric)`.
- **fairness** — mean-absolute-pairwise-difference (MAPD) disparity-ratio fair
skill score, per `(model, scope)` (scope = `age_group`, `sex`, `overall`, the
4 sensor categories, and per-channel rows).
Reducing each draw group to mean / SE / percentile-CI (and BCa for the headline
scopes) reproduces the published `forecasting_*_bootstrap.csv` tables.
> **Note — scope-level, not task-level.** Unlike the imputation track (whose
> `draws.parquet` is per-task `E`/`R`/`rank`, reducible to any scope), forecasting
> aggregates tasks → scopes *within* each draw, so its draws are already at the
> headline-scope level. They reproduce the headline CIs but cannot be re-aggregated
> to other scopes. (Re-aggregation is unnecessary for the leaderboard, which shows
> exactly these scopes.)
## Provenance
Generated by `scripts/paper_results/forecasting/produce_forecasting_bootstrap_draws.py`
in the code repo. The current snapshot was built with:
- `seed = 42`, `n_boot = 1000`, `ci_level = 0.95`
- `split = test` (canonical `sharable_users_seed42_2026`)
- 10 methods (see `draws.meta.json:methods`)
- Baseline: `seasonal_naive`; scored metrics: `mae` (continuous), `auroc` (binary)
- Within-user aggregation: micro; `age_bins = [18, 30, 40, 50, 60]`
- Fairness disparity: MAPD (mean absolute pairwise difference)
See `draws.meta.json` for the exact git commit and runtime metadata.
## Note: no pooled `per_user_errors.parquet`
The per-user substrate (the BCa LOO + point input) is **not** stored here — it is
exactly the concatenation of the per-method substrate files one level up:
```python
import glob, pandas as pd
pooled = pd.concat(
[pd.read_parquet(p) for p in glob.glob("forecasting/*.parquet")],
ignore_index=True,
)
```
## Loading
```python
from huggingface_hub import hf_hub_download
import pandas as pd, json
draws = pd.read_parquet(hf_hub_download(
"MyHeartCounts/OpenMHC-leaderboard-data",
"forecasting/bootstrap/draws.parquet", repo_type="dataset"))
meta = json.loads(open(hf_hub_download(
"MyHeartCounts/OpenMHC-leaderboard-data",
"forecasting/bootstrap/draws.meta.json", repo_type="dataset")).read())
print(meta["seed"], meta["n_boot"], len(meta["methods"]))
```
See [`SCHEMA.md`](SCHEMA.md) for the full column spec.
## Uploaded with
`tools/upload_leaderboard_bootstrap.py --track forecasting` in the
[code repo](https://github.com/AshleyLab/myheartcounts-dataset).