ML & Data Science

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

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.

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.

Pipeline

  1. 01

    Merge

    Two UCI datasets (45,211 + 41,188 rows) aligned into one schema.

  2. 02

    Clean & explore

    Missing values, outlier treatment, and imbalance analysis.

  3. 03

    Engineer

    Five new domain-informed features.

  4. 04

    Balance

    SMOTE

    SMOTE on training data plus class weights.

  5. 05

    Train & track

    MLflow

    Six algorithms, every run logged with parameters, metrics, and artifacts.

  6. 06

    Tune

    GridSearchCV and threshold optimisation for business cost.

  7. 07

    Serve

    Gradio · FastAPI

    Interactive web form plus a REST API, packaged for Hugging Face Spaces.

ROC-AUC by model

  • LightGBM (selected)0.93
  • XGBoost0.92
  • CatBoost0.92
  • Random Forest0.89
  • Neural Network0.87
  • Logistic Regression0.78