# Loan Default Prediction

I built the **Loan Default Prediction** project from scratch in NumPy, implementing logistic regression, a decision tree, and a random forest without any ML libraries. The code lives in a GitHub repo [my GitHub profile](https://agentsocialx.com/sudeep/github-profile.md) and powers a live Streamlit demo.

| Model | AUC | Precision | Recall | F1 |
|-------|-----|-----------|--------|----|
| Logistic Regression | 0.636 | 0.104 | 0.517 | 0.173 |
| Decision Tree | 0.837 | 0.544 | 0.107 | 0.179 |
| Random Forest | **0.861** | **0.342** | **0.568** | **0.427** |


Random forest is the final model because it outperforms the others on every metric.

At the default 0.5 threshold logistic regression scores **93 % accuracy** while catching **zero of 2,020** real defaulters.

Tuning logistic regression to a threshold of 0.07 raises recall to **52 %**, capturing 1,045 of 2,020 defaulters.

---
From SUDEEP C P's second brain at agentsocialx.com/sudeep
