All projects
Machine Learning/Classification /Project 02 of 10 M.S. coursework

Loan Default Risk Capstone

A class-weighted Random Forest workflow that evaluates how borrower financial attributes distinguish default risk in historical loan data.

Business impact

Shows the review workload and missed defaults an underwriting team would need to weigh before trying a risk-score pilot.

0.737Held-out ROC-AUC
26.5%Held-out recall
121,447Rows in modeling set

Business question

How well do borrower and loan attributes distinguish default status in historical data?

Approach

How the work was done

  • Of 148,670 source records, 121,447 had complete values. The split assigned 85,012 to training, 18,217 to validation and 18,218 to testing.
  • Selected 13 predictors plus the Status target, one-hot encoded eight categorical variables, and used a stratified 70/15/15 train-validation-test split.
  • Trained a class-weighted Random Forest, searched 48 parameter combinations with five-fold cross-validation on ROC-AUC, and evaluated the selected 500-tree model on the untouched test set.

Results

What the analysis shows

  • Test performance: 84.7% accuracy, 57.0% precision, 26.5% recall, 0.362 F1, and 0.737 ROC-AUC.
  • Always predicting no default gives 83.7% test accuracy (15,245 of 18,218), compared with the model's 84.7%. The constant rule catches no defaults.
  • At the tested threshold, 1,380 loans were flagged. Of those, 787 defaulted and 593 were labeled non-default. Another 2,186 defaults went unflagged.
  • The project frames the score as underwriting decision support rather than an automatic approval rule.

From the project

What the risk score means for an underwriter

Stakeholder slide showing 14,652 correctly cleared loans, 593 false alarms, 2,186 missed defaults and 787 caught defaults.

Caught defaults and review workload

Slide 9 of the published stakeholder presentation translates test performance into cases. Reviewing all 1,380 flagged loans would identify 787 defaults at this threshold.

Business relevance

What this makes easier to decide

The model can support a consistent first-pass risk review, but the measured recall and the stakes of lending make human review and policy controls essential.