Predict Loan Default Risk with Machine Learning
Evaluate borrower risk using machine learning and make smarter lending decisions. Analyze financial, demographic, and credit metrics to estimate the probability of loan default.
Risk Analysis
Model Engine Active
Credit Score: 740 | DTI: 28%
Loan Default Risk Assessment
Input borrower details across personal, financial, and loan parameter fieldsets to evaluate estimated default probability.
HistGradientBoosting88.69% Accuracy
Dataset Insights & Architecture
Structured borrower records utilized for model training, feature transformation, and supervised classification.
Borrower Records
Predictive Features
Target Class (0 / 1)
Loan Default Risk
Target Variable Definition: Default
The machine learning model is trained to predict the supervised binary class Default:
Representative Dataset Sample Rows
Displaying sample borrower vectors from the training pool
| Loan ID | Age | Income | Loan Amount | Credit Score | DTI Ratio | Employment | Purpose | Co-Signer | Target (Default) |
|---|---|---|---|---|---|---|---|---|---|
| LGD-10482 | 42 yrs | $85,000 | $25,000 | 740 | 28% | Full-time | Home Improvement | Yes | 0 (No Default) |
| LGD-10483 | 26 yrs | $38,000 | $18,000 | 590 | 52% | Part-time | Personal | No | 1 (Default) |
| LGD-10484 | 35 yrs | $62,000 | $15,000 | 685 | 34% | Full-time | Auto | No | 0 (No Default) |
| LGD-10485 | 51 yrs | $110,000 | $45,000 | 780 | 22% | Full-time | Business | Yes | 0 (No Default) |
| LGD-10486 | 29 yrs | $42,000 | $22,000 | 615 | 48% | Self-employed | Education | No | 1 (Default) |
| LGD-10487 | 38 yrs | $75,000 | $30,000 | 710 | 31% | Full-time | Home Improvement | No | 0 (No Default) |
| LGD-10488 | 24 yrs | $29,000 | $14,000 | 560 | 58% | Unemployed | Personal | No | 1 (Default) |
| LGD-10489 | 46 yrs | $92,000 | $20,000 | 765 | 25% | Full-time | Auto | Yes | 0 (No Default) |
Visual Feature Analytics
Statistical distributions and feature correlations derived from historical borrower data.
A. Target Class Distribution
Non-Default vs Default Ratio
Dataset exhibits an imbalanced ~78.4% Non-Default vs 21.6% Default distribution ratio.
B. Credit Score Tiers vs Default Rate
FICO score brackets vs default percentage
Strong negative correlation: Default rate drops from 42.8% in poor credit tier to 2.8% in top tier.
C. Income vs Loan Amount Scatter
Borrower financial capacity mapping
Higher loan amounts combined with lower annual income significantly increase default risk.
D. Loan Amount Tier vs Default Rate
Principal size impact on default probability
Loans over $80K display higher default rates (38.6%) compared to smaller micro-loans (14.5%).
E. Employment Type Breakdown & Default Comparison
Job category default rates across dataset cohorts
Unemployed status correlates with highest default probability (46.4%), whereas Full-time employment shows lowest default rate (16.2%).
Model Performance Metrics
Formal validation metrics evaluated across holdout borrower partitions by our Scikit-Learn engine.
Model Evaluation Ready
Scikit-Learn ML classifier pipeline evaluates Accuracy, Precision, Recall, F1, and ROC-AUC on holdout test partitions. Start the FastAPI backend on port 8000 to stream live metrics.
Ensemble decision trees with histogram-based binning & logistic calibration.
Binary classification target indicating borrower default status.
Standardized continuous features & one-hot encoded categorical parameters.
Accuracy
EvaluatedOverall correct prediction ratio
Precision
EvaluatedTrue defaults vs false positives
Recall (Sensitivity)
EvaluatedDetected defaults vs missed defaults
F1 Score
EvaluatedHarmonic mean of precision & recall
ROC-AUC Score
EvaluatedArea under Receiver Operating Characteristic curve
Log-Loss Rate
EvaluatedProbabilistic cross-entropy loss measure
How The Model Works
Borrower information is transformed into model-ready features and passed through a classification model to estimate default risk.
Data Input
Raw demographic, financial, and loan parameters provided via frontend form or API payload.
Preprocessing
Validation, missing value imputation, and outlier detection across continuous variables.
Feature Transformation
One-hot encoding for categorical variables and Standard/MinMax scaling for numerical inputs.
Model Prediction
Vector passed into binary classification model engine to generate probabilistic default score.
Risk Classification
Score categorized into LOW, MEDIUM, or HIGH risk tiers with structured recommendations.
Predictive Feature Information
Complete data schema for all 16 input features ingested by the risk evaluation engine.
Age of the primary borrower in years (18โ75).
Annual gross income of the borrower in USD.
Total principal amount requested for the loan.
FICO credit score ranging from 300 to 850.
Total duration of employment at current or recent job in months.
Number of active open credit cards and credit lines.
Annual percentage rate (APR) assigned to the loan.
Duration of the loan repayment period in months (12, 24, 36, 48, 60).
Debt-to-Income ratio (Total Monthly Debt payments รท Gross Monthly Income).
Highest completed education level (High School, Bachelor's, Master's, Doctorate).
Employment status (Full-time, Part-time, Self-employed, Unemployed).
Marital status (Single, Married, Divorced).
Whether the borrower currently has an active home mortgage (Yes / No).
Whether the borrower has financially dependent family members (Yes / No).
Intended usage of loan funds (Auto, Business, Education, Home Improvement, Personal).
Whether a secondary co-signer has guaranteed loan repayment (Yes / No).
LoanID).