Lab · c04.s02.L1

Leakage detector

A leak is decided by which rows a fitted step read, not by which rows its output is applied to.

Question: How can a pipeline that never trains on a held-out row still know that row's label?

Leakage detectorFifty row chips: 40 navy training rows and 10 gold held-out rows, with a bracket over the rows the screen reads. Below, one mark per kept column gives its correlation with the held-out label against a chance line; a curve plots mean errors from 10 to 200 columns and a scoreboard reports errors on the ten and the mean over 200 repetitions. All fifty fitted: the cloud sits right of chance, mean 0.015. Forty fitted: back to chance, mean 5.03.Leakage detector50 rows · 5,000 columns written without the labels · 10 held out123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495040 training10 held outkept columns: |correlation| with the held-out labelmean errors out of 10, by columns kept010columns kept: 10 to 200leakcleanScoreboard492013233769214116the screen reads all 50 rows: every label enters the fitted listmean 0.3858one mark per kept column · solid = leak · diagonal = clean · dashed = chanceleak · the screen read all 50 rowserrors here: 0 of 10mean 200 reps: 0.015 (0–1)|corr| 0.3858 · chance 0.2775clean · the screen read 40 rowserrors here: 5 of 10mean 200 reps: 5.03 (1–9)|corr| 0.263 · chance 0.2775fixed-class rule: 5.065 of 10only the column list is fitted
Re-simulated Re-simulated: 50 items, 5,000 columns written without the labels, 100 kept, 10 held out, 200 repetitions, data seed 20261108, split seed 60402 (script data/scripts/c04.s02.L1.py; after Hastie, Tibshirani and Friedman, The Elements of Statistical Learning, 2nd ed., section 7.10.2). Averaged over the 200 repetitions, the screen fitted on all 50 rows keeps columns with 0.4035 |corr| on the held-out rows and the pipeline makes 0.015 mean errors out of 10; fitted on the 40 training rows only, the same pipeline makes 5.03 and its mean |corr| falls to 0.2748, against a mean chance level of 0.2736. A rule that ignores every column makes 5.065. The published 3 per cent differs because 10 held-out items let one item move the count.
Lab controls
all 50 rows

Left/Right or Up/Down moves between the two options, Space or Enter selects the focused option, Home and End jump to the first and last

100

Arrow keys step 10 columns, Page Up/Down step 20, Home = 10, End = 200

1 of 6

Arrow Up/Down step 1, Page Up/Down step 2, Home = 1, End = 6, Enter re-reads the current split

Frame 1 of 6: The settingAll 50 rows, 100 columns kept, recorded split 1. The gold chips are the 10 held-out rows. A screen keeps the columns most correlated with the label, and a one-nearest-neighbour rule trained on the 40 navy rows is scored on the gold rows.

The setting. All 50 rows, 100 columns kept, recorded split 1. The gold chips are the 10 held-out rows. A screen keeps the columns most correlated with the label, and a one-nearest-neighbour rule trained on the 40 navy rows is scored on the gold rows.

Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.

Text description of this lab

Fifty row chips: 40 navy training rows and 10 gold held-out rows, with a bracket over the rows the screen reads. Below, one mark per kept column gives its correlation with the held-out label against a chance line; a curve plots mean errors from 10 to 200 columns and a scoreboard reports errors on the ten and the mean over 200 repetitions. All fifty fitted: the cloud sits right of chance, mean 0.015. Forty fitted: back to chance, mean 5.03.

Return to the section that hosts this lab

Caption status: re-simulated. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.