Holdout Sample
Study guide: Exam PCPA
A Holdout Sample is data deliberately kept out of model building so the finished model can be tested on observations it has never seen. ASOP No. 56 defines hold-out data as "a subset of data that is withheld intentionally when developing a predictive model so that the model may be validated later with data that were not used to develop the model."
The deviance of a model on the holdout sample is
\text{Holdout deviance} = \sum_{i \,\in\, \text{holdout}} d\big(y_i, \hat{\mu}_i^{\text{(train)}}\big)
d(y_i, \hat{\mu}_i)is observationi's contribution to the deviance.\hat{\mu}_i^{\text{(train)}}is observationi's prediction from the model fit on the training data only.
Any loss measure works (squared error for a normal model), but it must be computed on data the fit never used.
Training error and holdout error
Training error always falls as terms are added. Holdout error falls, then rises once the model starts fitting noise. ASOP 56 calls that overfitting: "a model fits the data used to develop the model so closely that prediction accuracy materially decreases when the model is applied to different data." Of the candidate models, the one with the lowest holdout error is selected. The trade-off behind this shape is the bias-variance tradeoff.
Which of these three frequency models should be selected? The deviances of three frequency models are:
Model Training deviance Holdout deviance A 10,480 4,520 B 10,310 4,470 C 9,950 4,610 Answer
- Training deviance falls from A to C, as it always does when terms are added.
- Holdout deviance is lowest for B (
4{,}470) and rises again for C (4{,}610).- C's gains on the training data are fitted noise that does not carry over to new data, which is overfitting.
- Model B is selected.
Splitting the data
A random split commonly puts 60–80\% of the data in training. An out-of-time split fits on earlier years and tests on the latest, which also tests stability over time. Either way, the split is made by policy, not by row, so one policy's renewals do not land on both sides.
A three-way split keeps a validation set for choosing between candidate models and a test set touched only once, at the end. Cross-Validation reuses the data more efficiently when the sample is small.
A personal auto data set of
250000policy-years is split70/30at random by policy. How many policy-years land in each part?
- The training data are
0.70 \times 250{,}000 = 175{,}000policy-years.- The holdout data are
0.30 \times 250{,}000 = 75{,}000policy-years.- The report states the split in one line: "
70\%/30\%random sample by policy, seed fixed for reproducibility."
Reporting the split
The CAS post-project summary for PCPA lists not holding out data (no train/test split or cross-validation), and not stating how the data were split, among the most common mistakes. Validation exhibits, such as the lift plot, the double lift chart and the Gini index, belong on the holdout data, and the report says so.
Selecting variables before the split Everything that learns from the response must use the training data only. That includes selecting variables, banding them, and tuning. Otherwise the holdout has already influenced the model, and its error understates the error on new data.
Practice questions
- CAS Exam 8 Fall 2012, Question 5
- CAS Exam 8 Fall 2013, Question 3
- CAS Exam 8 Fall 2014, Question 1
- CAS Exam 8 Fall 2015, Question 5
- CAS Exam 8 Fall 2017, Question 4
- Exam ATPA Practice Question 23
- Exam ATPA Practice Question 49
- Exam DISC-DA Practice Question 211
- Exam DISC-DA Practice Question 212
- Exam DISC-DA Practice Question 235
- Exam MAS-I Practice Question 127
- Exam MAS-I Practice Question 128
- CAS Exam MAS-II Fall 2018, Question 37
- Exam PA Practice Question 12