A model is fitted on 40 rows and makes 2 errors on them. Before fitting, 50 further rows were held out, and on those rows the model makes 9 errors. Report the optimism, meaning the test error minus the training error, to three decimal places.
Worked solution
The training error is The test error is The optimism is the difference: The training error is 13 percentage points lower than the held-out error, which is the amount by which the model flatters itself on rows it has already seen. The sign matters: if the held-out error had been smaller, the optimism would be negative. Section 15.1 defines the gap as the price of freedom, and a report that gives only 0.05 hides that price.