Machine Learning · Risk Modeling

Credit Card Default Prediction

A gradient-boosted credit-risk model estimating default probability over 300K+ transactions — 90% validation accuracy and 0.870 AUC after tuning.

Role
Solo build
Type
Personal project
Timeline
Nov — Dec 2023
Data
300K+ transactions
XGBoostRandom ForestGradient BoostingScikit-learnFeature EngineeringPython

Motivation

Lenders need to estimate the probability that a customer defaults so they can price risk and manage exposure. The goal was a model that's both accurate and well-calibrated on a large, imbalanced transaction dataset — and interpretable enough to trust for risk decisions.

Architecture

A standard but rigorous ML pipeline: clean and impute, engineer features, train gradient-boosted ensembles, and validate with cross-validation and AUC rather than accuracy alone.

💳Transactions300K+
🧹Impute + Engineerfeature design
🌲XGBoost / RFensembles
📈CV + AUC0.870 AUC

Risk modeling is judged on AUC and calibration, not headline accuracy.

What I built

  • Models to estimate default probability for risk management.
  • An XGBoost model at 90% validation accuracy over 300K+ transactions.
  • An optimized Random Forest, with results improved 23% through feature engineering.
  • A refined Gradient Boosting model reaching 86.3% F1 and 0.870 AUC via cross-validation and hyperparameter tuning.

Results

90%Validation accuracy
0.870AUC
86.3%F1 score
+23%Lift from feature eng.

Challenges

  • Class imbalance: defaults are the minority class, so accuracy is misleading — I optimized for F1 and AUC instead.
  • Feature engineering: the biggest gains (23%) came from derived features, not model swaps.
  • Generalization: cross-validation and tuning guarded against overfitting on 300K+ rows.

Learnings

  • On imbalanced problems, pick the right metric first — accuracy hides failure.
  • Feature engineering > model choice for tabular data; gradient boosting just amplifies good features.
  • Cross-validation is non-negotiable for trustworthy risk estimates.
Back to start
US Surcharge ETL Platform