Having understood the tools and methods data scientists use and their strengths and weaknesses, Paige is ready to train a model from the full PD dataset and construct a payoff matrix to quantify the value of its predictions on the new loans PD offers in Q1 2020. Paige’s team returns to the PD dataset described in Step 2: Obtain and Explore Relevant Data. There are 500,000 funded loans in the dataset, of which 100,000 are loans that default and 400,000 are loans that repay . The overall default rate is .
Per Step 3: Prepare the Data, the team cleans the data to eliminate any features that would contribute to target leakage. It then separates the dataset into a training, validation, and holdout samples. The holdout sample is 20% of the total set , the training set is 60% of the total set , and the cross-validation set is 20% of the total set .
In Step 4: Build a Model, the team trains its models on the sample of 300,000 loans and cross-validates them with a sample of 100,000. It chooses the pruned decision tree that maximizes the likelihood value in the validation sample.* The team then runs the model on the holdout sample and obtains a similar likelihood value.
Per Step 5: Evaluate the Model, Paige and the team consider some important metrics to understand how much they can rely on the model to give accurate predictions on a set of new loan data. The first metric, the model’s likelihood value computed on the validation set, is very good: it is 0.85.* The model will provide reasonably accurate predictions. The second set of metrics is feature impact. Exhibit 11-22 presents the feature impacts. The feature impact is a value (0 to 100) assigned to each feature variable in the training set that indicates how important it is in partitioning the data to minimize Gini impurity, that is, how frequently a feature is used in making cuts at various nodes of the decision-tree model. The variable that is used most often (grade) is normalized to a value of 100. The next most important variable in making cuts is credit score with a value of 18, indicating that it is used 18% as frequently as grade is to make a cut.
| Feature | Impact Score |
|---|---|
| Grade | 100 |
| Credit score | 18 |
| Debt-to-income | 17 |
| Annual income | 15 |
| Loan amount | 11 |
| Purpose of loan | 1 |
| Homeownership | 1 |
Not surprisingly, the grade assigned to the loan by PeerLend Digital was by far the most important feature for distinguishing default loans from repay loans. Grades A and B had a high number of repay loans, while Grades E and F had many more default loans. It suggested, as Paige had expected, that PeerLend Digital was doing a good job of identifying default risk. Interestingly, however, credit score, debt-to-income, annual income, and loan amount were also relevant features (though much less important than grade) for separating repay loans from default loans in the decision-tree model. This meant that there was incremental information content in these variables for identifying default loans over and above what was available in the grade feature. These variables might help to identify more of the default loans (true positives) without classifying too many repay loans as default loans (false positives). If they could do so, Sierra would not invest in loans predicted to default and earn a return greater than what it would have earned by investing in all PD loans.
Paige is surprised by some features not being relevant to identifying default loans. For example, she had anticipated that homeownership would have a higher impact; she hypothesized that loan applicants who owned homes tended to have more stable incomes, savings, and lives, which were all characteristics that would make them more likely to repay a small loan. Instead, the model showed this feature had no discernable impact. Nevertheless, Paige is comfortable with the features used by the model to identify default loans. They make intuitive sense. She is ready to evaluate how well the model performs in classifying default and repay loans.
Paige turns to the ROC curve. Exhibit 11-23 presents the ROC curve. It moves nicely up along the y-axis far away from the diagonal line joining the origin (0, 0) to the upper-right corner (1, 1), indicating that the model does well in partitioning defaults from repays. The shape of the curve suggests that the model predictions will be useful for predicting defaults without the risk of too many false positives and false negatives.

Paige explores several confusion matrixes using different default probability cutoffs. Exhibit 11-24 presents the contents of the confusion matrixes vertically for easy comparison of the distribution of predictions across six selected default probability cutoffs for the validation sample of 100,000 loans. Sierra plans to invest $100 in each of the 100,000 loans; if Sierra does not invest in a PeerDigital loan, Sierra will invest the $100 earmarked for that loan in the alternate investment. Recall that Paige rejects all loans above the default probability cutoff (classified as positive with a high predicted probability of default) and accepts all loans below the default probability cutoff (classified as negative with a low predicted probability of default). For example, at the 0.35 cutoff, Sierra rejects all loans with a predicted default probability greater than 0.35—the true positives of 3,942 and the false positives of 5,072 for a total of loans—and invests in all loans with a predicted default probability below 0.35—the true negatives of 76,959 and the false negatives of 14,027 for a total of loans.

The details of the number of loans in each quadrant of the confusion matrix are as follows:
Model Classification: 0.20.
True positive: 10,840.
True negative: 57,702.
False positive: 24,328.
False negative: 7,130.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Model Classification: 0.25.
True positive: 8,082.
True negative: 67,035.
False positive: 14,994.
False negative: 9,889.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Model Classification: 0.30
True positive: 5,590.
True negative: 73,586.
False positive: 8,444.
False negative: 12,380.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Model Classification: 0.35.
True positive: 3,942.
True negative: 76,959.
False positive: 5,072.
False negative: 14,027.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Model Classification: 0.37.
True positive: 3,183.
True negative: 78,201.
False positive: 3,828.
False negative: 14,788.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Model Classification: 0.40.
True positive: 2,369.
True negative: 79,392.
False positive: 2,637.
False negative: 15,602.
Total Number of Loans: 100,000.
Investment: 10,000,000 dollars.
Consistent with the simple example, a higher default probability cutoff means that Sierra is rejecting fewer loans and accepting more loans. Therefore, as the default probability cutoff increases, Sierra rejects fewer default loans (true positives) and also has fewer repay loans misclassified as defaults (false positives). At a higher default probability cutoff, Sierra accepts more loans that repay (true negatives) but also has more default loans misclassified as repay (false negatives).
Paige uses values from her payoff matrix to determine which default probability cutoff is the most profitable investment. Recall that Paige assigns $45 to each true negative (repay loans) and to a false negative (default loan). She uses two values for the alternative investment opportunities, $6 over 3 years and $12 over 3 years, to model a more-conservative and a less-conservative payoff scenario. Exhibit 11-25 presents these two payoff scenarios and the cumulative and annual return on investment (ROI) on the $10,000,000 investment. Consider the payoff column for the 0.35 default probability cutoff and the alternate investment payoff of $6 over 3 years.

The first scenario shows Alternate Investment Payout (3yr): 6 dollars. Here the scenario for 0.35 is highlighted.
Model Classification: Payoffs
True positive: 6.00 dollars
True negative: 45.00 dollars
False positive: 6.00 dollars
False negative: (70.00) dollars
Total:
ROI percentage (3 years):
ROI percentage (1 year):
Model Classification: 0.20
True positive: 65,040 dollars
True negative: 2,596,590 dollars
False positive: 145,968 dollars
False negative: (499,100) dollars
Total: 2,308,498.00 dollars
ROI percentage (3 years): 23.08
ROI percentage (1 year): 7.69
Model Classification: 0.25
True positive: 48,492 dollars
True negative: 3,016,575 dollars
False positive: 89,964 dollars
False negative: (692,230) dollars
Total: 2,462,801.00 dollars
ROI percentage (3 years): 24.63
ROI percentage (1 year): 8.21
Model Classification: 0.30
True positive: 33,540 dollars
True negative: 3,311,370 dollars
False positive: 50,664 dollars
False negative: (866,600) dollars
Total: 2,528,974.00 dollars
ROI percentage (3 years): 25.29
ROI percentage (1 year): 8.43
Model Classification: 0.35
True positive: 23,625 dollars
True negative: 3,463,155 dollars
False positive: 30,432 dollars
False negative: (981,890) dollars
Total: 2,535,349.00 dollars
ROI percentage (3 years): 25.35
ROI percentage (1 year): 8.45
Model Classification: 0.37
True positive: 19,098 dollars
True negative: 3,519,045 dollars
False positive: 22,968 dollars
False negative: (1,035,160) dollars
Total: 2,525,951.00 dollars
ROI percentage (3 years): 25.26
ROI percentage (1 year): 8.42
Model Classification: 0.40
True positive: 14,214 dollars
True negative: 3,572,640 dollars
False positive: 15,822 dollars
False negative: (1,092,140) dollars
Total: 2,510,536.00 dollars
ROI percentage (3 years): 25.11
ROI percentage (1 year): 8.37
The second scenario shows Alternate Investment Payout (3yr): 12 dollars. Here the scenario for 0.30 is highlighted.
Model Classification: Payoffs
True positive: 12.00 dollars
True negative: 45.00 dollars
False positive: 12.00 dollars
False negative: (70.00) dollars
Total:
ROI percentage (3 years):
ROI percentage (1 year):
Model Classification: 0.20
True positive: 130,080 dollars
True negative: 2,596,590 dollars
False positive: 291,936 dollars
False negative: (499,100) dollars
Total: 2,519,506 dollars
ROI percentage (3 years): 25.20
ROI percentage (1 year): 8.40
Model Classification: 0.25
True positive: 96,984 dollars
True negative: 3,016,575 dollars
False positive: 179,928 dollars
False negative: (692,230) dollars
Total: 2,601,257 dollars
ROI percentage (3 years): 26.01
ROI percentage (1 year): 8.67
Model Classification: 0.30
True positive: 67,080 dollars
True negative: 3,311,370 dollars
False positive: 101,328 dollars
False negative: (866,600) dollars
Total: 2,613,178 dollars
ROI percentage (3 years): 26.13
ROI percentage (1 year): 8.71
Model Classification: 0.35
True positive: 47,304 dollars
True negative: 3,463,155 dollars
False positive: 60,864 dollars
False negative: (981,890) dollars
Total: 2,589,433 dollars
ROI percentage (3 years): 25.89
ROI percentage (1 year): 8.63
Model Classification: 0.37
True positive: 38,196 dollars
True negative: 3,519,045 dollars
False positive: 45,936 dollars
False negative: (1,035,160) dollars
Total: 2,568,017 dollars
ROI percentage (3 years): 25.68
ROI percentage (1 year): 8.56
Model Classification: 0.40
True positive: 28,428 dollars
True negative: 3,572,640 dollars
False positive: 31,644 dollars
False negative: (1,092,140) dollars
Total: 2,540,572 dollars
ROI percentage (3 years): 25.41
ROI percentage (1 year): 8.47
On the 76,959 true negative loans, Sierra earns . On the 14,027 false negative loans, Sierra loses . Sierra does not invest in the 3,942 loans it classifies as true positives. Instead it invests the available funds in the safe bond to earn 6% over 3 years equal to . Sierra also does not invest in the 5,072 loans it classifies as false positives and instead invests $507,200 in the safe bond to earn . The 0.35 default probability cutoff yields the highest ROI of over 3 years or per year.*
From a technical perspective, Paige is pleased with the analysis. In the $6 alternative-payout scenario, the optimal default probability cutoff of 0.35 yields an annual return of 8.45%, which is 1% greater than what Sierra would have earned by investing in all 100,000 PD loans. Twenty percent of the loans would have defaulted and 80% would have repaid, for a payout of . The return over 3 years, based on the $10,000,000 investment, would be per year. Data science allows her to make better investments on behalf of clients to increase their returns and increase the firm’s profit.