I Built an AI That Predicts Who Will Cancel Netflix | Project StreamGuard
Indranil Garai
0:00 / 0:00
I Built an AI That Predicts Who Will Cancel Netflix | Project StreamGuard
6 просмотров · 9 дней назад
Indranil Garai
6 просмотров · 9 дней назад
📌 ABOUT THE PROJECT
Customer churn (subscribers cancelling) is one of the biggest threats to a streaming business, because winning a new customer costs far more than keeping an existing one. StreamGuard is an end-to-end ML pipeline with two goals:
1. Classification: predict whether a subscriber will churn (yes/no).
2. Regression: forecast each customer's Customer Lifetime Value (CLV) in USD.
The dataset is synthetic (generated for this project) and modelled on a Netflix-style service, with deliberately messy data: missing values, a $99,999 fee typo, and negative watch hours.
━━━━━━━━━━━━━━━━━━━━
🛠️ WHAT I BUILT
Data cleaning: median and mode imputation, IQR outlier detection and capping
Feature engineering: Engagement Efficiency Index (watch hours per dollar) and Engagement Index
One-Hot Encoding and Z-Score standardization, fitted only on training data to avoid data leakage
Recursive Feature Elimination with Cross-Validation (RFECV)
Stratified 5-Fold cross-validation
Baseline models: Logistic Regression, KNN, SVM
Ensemble models: Random Forest (bagging) and AdaBoost (boosting), tuned with RandomizedSearchCV
CLV regression: Linear Regression, Random Forest and Gradient Boosting
━━━━━━━━━━━━━━━━━━━━
📊 KEY RESULTS
Churn prediction (best model: Logistic Regression)
Cross-validated ROC-AUC: 0.756
Held-out test set (120 customers): 87% recall, 0.84 ROC-AUC, 77.5% accuracy
Surprise: the simple baseline beat the tuned ensembles on this dataset
CLV forecasting (best model: Gradient Boosting)
Test MAE: about $55 | RMSE: about $76 | R²: 0.88
Note: the test set is small (120 rows), so cross-validation scores are the more reliable estimate.
━━━━━━━━━━━━━━━━━━━━
📚 TERMS EXPLAINED IN THE VIDEO
Churn, CLV, cross-validation, stratification, recall, precision, ROC-AUC, MAE, RMSE, R², bagging vs boosting, data leakage
━━━━━━━━━━━━━━━━━━━━
🧰 TECH STACK
Python, pandas, NumPy, scikit-learn, matplotlib, seaborn, Jupyter Notebook, VS Code
━━━━━━━━━━━━━━━━━━━━
▶️ RUN IT YOURSELF
1. Clone the repo: https://github.com/Indranil-007/Project_St...
2. Install the dependencies: pip install -r requirements.txt
3. Run the pipeline: python main.py
4. Or open notebooks/streamguard.ipynb and Run All
━━━━━━━━━━━━━━━━━━━━
🔗 CONNECT
LinkedIn: https://www.linkedin.com/in/indranil-garai/
GitHub profile: https://github.com/Indranil-007
If this helped you, like the video and subscribe for more data science and ML projects. Questions or ideas? Leave a comment!
#MachineLearning #ChurnPrediction #DataScience #Python #ScikitLearn