Skip to content

bikram73/Subscription_Churn_Analysis

Repository files navigation

πŸ“‰ Subscription Churn Analysis (OTT / SaaS)

Python Pandas Scikit-learn Notebook

An end-to-end churn analytics project that identifies churn drivers, predicts churn probability, and segments high-risk customers using the Telco Customer Churn dataset (adapted to OTT/SaaS PRD requirements).

✨ Features

  • πŸ“Š Churn KPI Analysis: Calculates overall churn rate and group-level churn trends.
  • 🧹 Data Cleaning Pipeline: Handles missing values and type corrections.
  • 🧠 Feature Engineering: Builds engagement score, tenure groups, and churn-ready features.
  • πŸ“ˆ Rich Visualizations: Tenure, usage, pricing, support behavior, and correlation heatmap.
  • πŸ€– ML Modeling: Logistic Regression and Random Forest model training + evaluation.
  • 🎯 Risk Segmentation: Generates churn probabilities and classifies users into Low/Medium/High risk.
  • πŸ’Ό Business Insights: Produces actionable retention recommendations.

🧰 Tech Stack

  • Python
  • Pandas, NumPy
  • Matplotlib, Seaborn
  • Scikit-learn
  • Jupyter Notebook

πŸ“ Project Structure

Subscription_Churn_Analysis/
β”œβ”€β”€ Telco_Customer_Churn.csv
β”œβ”€β”€ README.md
β”œβ”€β”€ analysis_summary.md
β”œβ”€β”€ subscription_churn.csv
β”œβ”€β”€ subscription_churn.ipynb
β”œβ”€β”€ subscription_churn.py
β”œβ”€β”€ outputs/
β”‚   β”œβ”€β”€ churn_rate.png
β”‚   β”œβ”€β”€ tenure_churn.png
β”‚   β”œβ”€β”€ usage_churn.png
β”‚   β”œβ”€β”€ charges_churn.png
β”‚   β”œβ”€β”€ support_churn.png
β”‚   β”œβ”€β”€ correlation_heatmap.png
β”‚   β”œβ”€β”€ model_accuracy.png
β”‚   └── feature_importance.png
└── requirements.txt

πŸš€ Installation

  1. Clone the repository
git clone https://github.com/https://github.com/bikram73/Subscription_Churn_Analysis.git
cd Subscription_Churn_Analysis
  1. Create and activate virtual environment (recommended)
python -m venv .venv

Windows PowerShell:

.venv\Scripts\Activate.ps1
  1. Install dependencies
pip install -r requirements.txt

▢️ Usage

Run Python Pipeline

python subscription_churn.py

This generates:

  • subscription_churn.csv (normalized + scored dataset)
  • analysis_summary.md (insights + model performance + recommendations)
  • outputs/*.png (all required charts)

Run Notebook Workflow

Open subscription_churn.ipynb and run all cells in order.

  • Notebook visualizations are shown inline.
  • Notebook cells are designed to analyze without saving charts to outputs/.

πŸ“Œ Key Objectives Covered

  • Calculate churn rate
  • Identify major churn factors
  • Segment high-risk users
  • Build and evaluate prediction models
  • Recommend retention strategies

🧾 Dataset Note

Source dataset (Kaggle): https://www.kaggle.com/datasets/blastchar/telco-customer-churn

The Telco dataset does not directly contain OTT telemetry fields like exact app usage frequency, last login days, and customer support call counts.

πŸ“œ License

This project is licensed under the MIT License.

  • See LICENSE

About

πŸ“Š Subscription Churn Analysis (OTT / SaaS) is an end-to-end data analytics and machine learning project designed to analyze customer churn behavior, identify key retention factors, and predict churn probability for subscription-based platforms such as OTT streaming services and SaaS products.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors