docs: ship the leakage chart renderer as a public script - #193
Merged
Conversation
r/dataisbeautiful requires a comment linking the tool and the data source. The renderer lived in scripts/announce/, which is gitignored, so there was nothing to link to. Moves it to scripts/render_leakage_chart.py, next to the two leakage experiments it re-runs. Same walk-forward cross-validation, per-fold scores kept instead of averaged, so the figure shows the shape of the backtest rather than one number per condition. Reproduces the published means: synthetic 0.625 as-of against 0.750 whole-history, real 0.482 against 0.858. Rendered output (PNG, SVG, the numbers JSON, the score cache) stays gitignored. scripts/announce/ and the other local working-note paths are ignored explicitly rather than by accident.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
r/dataisbeautiful requires a comment linking the tool and the data source. The renderer that produced the leakage figure lived in
scripts/announce/, which is gitignored, so there was no public link to give.What
scripts/render_leakage_chart.py, sitting next to the two leakage experiments it re-runs. It calls the same_panel/_clfhelpers and the sameFiscalYearGroupedSplitterwalk-forward CV asleakage_experiment.pyandreal_data_leakage_experiment.py, but keeps the per-fold scores instead of averaging them, so the figure shows the shape of the backtest rather than one number per condition.--cachedre-plots from a saved score file (the real panel takes ~9 minutes to refit),--outpicks the output directory..gitignore:scripts/announce/and the other local working-note paths are now ignored explicitly rather than by accident, and the rendered figure files stay out of the tree.## [Unreleased].No library code changes; nothing under
philanthropy/is touched.Verification
Re-plotted from the committed run's score cache and diffed the numbers against
docs/explanation/benchmarks.mdand the preprint:Matches the published 0.625 / 0.750 and 0.482 / 0.858.