Overview01
Lenders need to spot high-risk borrowers before a loan hits the books. This project builds and compares classifiers that predict default from a borrower’s financial and demographic profile, and looks at which factors drive the predictions.
How it works02
- Explore and prep. Exploratory analysis, encoding, scaling, outlier removal, and pruning of low-importance features.
- Benchmark five models. Logistic Regression, Decision Tree, Random Forest, SVM, and Gradient Boosting, trained at default settings.
- Tune the top two. Random Forest and Gradient Boosting were tuned for F1. Gradient Boosting came out best: ROC-AUC 0.77, F1 0.42, recall 0.35.
What it found03
Random Forest feature importance ranked these as the top drivers of default risk: employment duration, checking-account status, years at residence, age, and loan duration.
What I’d do next. Recall is still 0.35, so the model misses most defaulters. Class weighting or resampling is the next thing I’d try.
Tech
Pythonpandasscikit-learnGradient BoostingRandom ForestSVMLogistic RegressionDecision Tree