
I Dockerized a Bank-Grade Credit Card Fraud Detection App with XGBoost (Recall 0.92 + SHAP)
I Dockerized a Bank-Grade Credit Card Fraud Detection App with XGBoost 1. Project Background & Challenge Credit card fraud detection is a classic extreme imbalanced data problem (fraud rate only 0.172%). Normal accuracy looks amazing (~99.8%), but in real business the cost of false negatives is huge. So I built the model with a Recall-first approach. 2. Key Results Recall: 0.92 PR-AUC: 0.85 SHAP analysis clearly identified V14 and V17 as the top fraud drivers 3. Tech Stack & Production Features Model: XGBoost + scale_pos_weight for imbalance Production: Docker + docker-compose Testing: Full unit tests Model persistence: joblib with DataFrame input Dependencies: All strictly pinned 4. How to Run (Docker) docker compose up 5. GitHub Repository https://github.com/Retro099/ML-Projects/tree/main/Credit_Card_Fraud_Detection 6. What I Learned Always use Recall + PR-AUC as main metrics for imbalanced data In production, always use DataFrame for predictions Dockerization dramatically increases
Continue reading on Dev.to
Opens in a new tab

