# Sport Intelligence Benchmark ## Due risultati distinti / Two distinct results This repository reports **two different Brier scores, deliberately never reconciled into one**: | | Sintetico, riproducibile / Synthetic, reproducible | Produzione, non verificabile da terzi / Production, not verifiable by third parties | |---|---|---| | **Metric** | Brier score (3-class summed, range 0.0-2.0) on the shipped synthetic sample | Brier **0.5783** on the real 97,000-match production corpus | | **Command** | `python run_benchmark.py --seed 42` (in-sample; add `--holdout` for a stricter 75/25 split) against the shipped `data/derived_sample.csv`, itself generated deterministically via `python export_dataset.py --rows 4000 --seed 42 --output data/derived_sample.csv` | Not reproducible from this repository — the underlying match data is not redistributable | | **Verifiability** | A third party can run the command above end to end and check the printed number | This number **cannot be verified by anyone outside the project** — it is reported for transparency, not for independent reproduction | The two numbers differ in magnitude because the synthetic sample is far smaller than the real 97,000-match corpus and is generated, not sampled — a small, generated in-sample dataset lets the model fit far more tightly than noisy real data would allow. See [DATA_PROVENANCE.md](./DATA_PROVENANCE.md) for the full reconciliation, including the exact Brier formula and scale. Hiding this discrepancy, or presenting one number as an approximation of the other, would be the same claim/verification gap this project prohibits elsewhere (VIN-NN, D-09) — so both numbers are stated here, openly, as two different things. This repo ships the ensemble V2 LightGBM meta-learner methodology that scored a Brier score of 0.5783 (3-class summed definition, range 0.0-2.0) across 97,000 historical European football matches in production - the code, a derived/synthetic reproduction dataset, and the exact command to run the pipeline end-to-end with no database and no network access. ## Prerequisites - Python 3.12+ - pip ```bash pip install -r requirements.txt ``` ## Reproduce Run this single command to reproduce the methodology on the shipped synthetic sample: ```bash python run_benchmark.py ``` Expected output: a printed Brier score (3-class summed, range 0.0-2.0) and log-loss for a LightGBM meta-learner fit and evaluated in-sample, mirroring the production `train_advanced.py` methodology exactly. A stricter, held-out variant is available via `python run_benchmark.py --holdout`. See [DATA_PROVENANCE.md](./DATA_PROVENANCE.md) for the full methodology, the exact Brier formula, and why the printed number differs in magnitude from the production 0.5783 figure (synthetic sample size vs. 97,000 real matches). To regenerate the shipped sample yourself: ```bash python export_dataset.py --rows 4000 --seed 42 --output data/derived_sample.csv ``` ## Tests ```bash pytest -v ``` ## Data `data/derived_sample.csv` is a fully synthetic dataset - not a copy, subset, or aggregate of any third-party match-data provider, and not an export of any production database. See [DATA_PROVENANCE.md](./DATA_PROVENANCE.md) for the full explanation of why, and for a "bring your own data" path if you want to benchmark on real historical results. ## License MIT - see [LICENSE](./LICENSE). ## Licenza / License Code: MIT. Contents of `data/`: CC-BY-4.0. Neither the Zenodo deposit metadata nor `CITATION.cff` can express two licences for one artefact structurally, so this repository's licence is split explicitly in prose across three places that agree verbatim: this section, the [`## Scope`](./LICENSE) section of the root `LICENSE`, and [data/LICENSE](./data/LICENSE). ## Cite See [CITATION.cff](./CITATION.cff) for the machine-readable citation (GitHub renders a "Cite this repository" widget from this file). DOI/Zenodo integration is deferred to Phase 97 - until then, cite via the repository URL and the CITATION.cff metadata. ## Read the deep-dive The full write-up (methodology, own-datum discussion, trade-off reasoning) lives at: [federicocalo.dev/blog/sport-intelligence-benchmark-97k-partite](https://federicocalo.dev/blog/sport-intelligence-benchmark-97k-partite) (IT) / [federicocalo.dev/en/blog/sport-intelligence-benchmark-97k-matches](https://federicocalo.dev/en/blog/sport-intelligence-benchmark-97k-matches) (EN).