maaz.code logo
Simple view

Live

E-Commerce Customer Churn Prediction

Stacking ensemble that predicts which e-commerce customers will churn, deployed with a live app.

  • Accuracy96%
  • Macro F10.93
  • Python
  • Scikit-Learn
  • Imbalanced-Learn
  • XGBoost
  • FastAPI
  • React
  • Docker

from portfolio.demos import churn
churn.predict(customer) # POST /predict to the deployed model

Output will appear here. Press ▶ to run the churn predictor.

What it does

Predicts whether a customer churns based on their behavioural and personal data.

  • Preprocessing: KNN imputation, winsorization, one-hot encoding, and SMOTE for class imbalance.
  • Model: a stacking ensemble (KNN, SVM, XGBoost, Random Forest) with a Logistic Regression meta-model.
  • Results: 96% accuracy and 0.93 macro F1.
  • Deployment: FastAPI backend and React frontend, both on Vercel.