Classification · MLOps
Bank Term-Deposit Prediction
Predicts which bank clients will subscribe to a term deposit, so marketing teams call the right people and stop spamming everyone else.
- Role
- ML Engineer
- Year
- 2025
- Focus
- Classification
- Stack
- 7 technologies
- LightGBM
- XGBoost
- scikit-learn
- SMOTE
- MLflow
- FastAPI
- Gradio
0.93
ROC-AUC (LightGBM)
78%
Precision
67%
Recall: 2 in 3 subscribers found
86K
Records merged
The problem
Telemarketing campaigns waste most of their calls. Only about 12% of clients subscribe, an 88:12 class imbalance that makes naive models predict 'no' for everyone.
Overview
I merged the two UCI Bank Marketing datasets (2011 and 2014 versions) into 86,399 records, cleaned and explored them, and engineered five domain features. Imbalance is handled with SMOTE plus class weights.
I trained and compared six algorithms with full MLflow experiment tracking. The best model was tuned with GridSearchCV and its decision threshold set for the business goal. It's deployed with a Gradio web interface and a FastAPI REST API.
Architecture
Pipeline
- 01
Merge
Two UCI datasets (45,211 + 41,188 rows) aligned into one schema.
- 02
Clean & explore
Missing values, outlier treatment, and imbalance analysis.
- 03
Engineer
Five new domain-informed features.
- 04
Balance
SMOTESMOTE on training data plus class weights.
- 05
Train & track
MLflowSix algorithms, every run logged with parameters, metrics, and artifacts.
- 06
Tune
GridSearchCV and threshold optimisation for business cost.
- 07
Serve
Gradio · FastAPIInteractive web form plus a REST API, packaged for Hugging Face Spaces.
Results
ROC-AUC by model
- LightGBM (selected)0.93
- XGBoost0.92
- CatBoost0.92
- Random Forest0.89
- Neural Network0.87
- Logistic Regression0.78