Now that you understand full versus pruned decision trees and the related tradeoffs, we introduce three techniques: cross-validation using prediction accuracy, cross-validation using maximum likelihood, and testing on holdout samples that management accountants and data scientists use to choose among models such as the full and pruned decision tree.
Cross-validation is the process of comparing predictions of different models on a new set of data for which the actual outcomes (default or repay) are already known. Managers choose the model that predicts most accurately.
To determine whether the pruned tree performs better than the full tree, data scientists at Sierra test both models on 10 randomly selected new borrower records listed in Exhibit 11-13. For each new borrower listed in column 1, column 2 lists income, column 3 lists the credit score, and column 4 lists the actual outcome: default or repay. Of the 10 new observations, eight repaid and two defaulted; that is, the cross validation (also called validation) sample has the same 20% default rate as the population.
| Observation | Income | Credit Score | Actual Outcome (y) | Full Tree Prediction | Pruned Tree Prediction |
|---|---|---|---|---|---|
| (1) | (2) | (3) | (4) | (5) | (6) |
| 1 | $60,000 | 690 | Default | Repay* | Repay*(with probability 2/3) |
| 2 | $67,000 | 710 | Repay | Default* | Repay (with probability 2/3) |
| 3 | $55,000 | 772 | Repay | Repay | Repay (with probability 1) |
| 4 | $61,000 | 702 | Repay | Repay | Repay (with probability 2/3) |
| 5 | $58,000 | 715 | Repay | Repay | Repay (with probability 1) |
| 6 | $54,000 | 725 | Default | Default | Default (with probability 1) |
| 7 | $87,000 | 665 | Repay | Repay | Repay (with probability 1) |
| 8 | $90,000 | 660 | Repay | Repay | Repay (with probability 1) |
| 9 | $59,000 | 718 | Repay | Repay | Repay (with probability 1) |
| 10 | $53,000 | 775 | Repay | Repay | Repay (with probability 1) |
| Correct Classification Rate | 8/10 | 9/10 | |||
Exhibit 11-13 shows the predictions for each borrower made by the full tree (column 5) and the pruned tree (column 6).*
To compare how the fully grown tree and pruned tree classify each of the borrowers, consider record 2, with income of $67,000 and credit score of 710. Follow how the fully grown decision tree in Exhibit 11-11 classifies this record.
That default classification is wrong because the known actual outcome for record 2 in Exhibit 11-13 is repay.
Now turn to the pruned tree in Exhibit 11-12 and follow how the pruned tree classifies record 2, noting that the path of the record for the first three nodes is the same as for the full tree:
The actual outcome of record 2 in Exhibit 11-13 is also repay. The pruned tree correctly predicts the actual outcome.
Exhibit 11-13 shows the predictions of the fully grown decision tree and the pruned decision tree for the 10 new borrowers. The pruned tree more accurately classifies the validation set overall by correctly predicting 9 out of 10 loans (9/10), while the fully grown tree correctly predicts only 8 out of 10 loans (8/10). Data scientists at Sierra Investments recommend using the pruned tree model on new data because it performs better in predicting default and repay loans.
The data scientists also suggest a more sophisticated approach to comparing the full decision tree model to the pruned decision tree model.