darrylrayhananta's picture
Upload 6 files
96cb3a0 verified
metadata
title: Telco Customer Churn Prediction
emoji: πŸ“ž
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: mit
tags:
  - machine-learning
  - customer-churn
  - classification
  - business-analytics
  - scikit-learn
  - telecommunications
datasets:
  - telco-customer-churn
metrics:
  - accuracy
  - precision
  - recall
  - f1
  - roc_auc
pipeline_tag: tabular-classification

πŸ“ž Telco Customer Churn Prediction Model

A machine learning model that predicts customer churn probability for telecommunications companies with 84.2% ROC-AUC accuracy.

πŸš€ Quick Start

import joblib
import pandas as pd

# Load the model
model = joblib.load('model.joblib')

# Make prediction (requires 45 features)
churn_probability = model.predict_proba(customer_data)[:, 1]

πŸ“Š Model Performance

Metric Score
ROC-AUC 0.8419
Accuracy 0.8055
Precision 0.6572
Recall 0.5588
F1-Score 0.6040

🎯 Risk Categories

  • 🚨 High Risk (β‰₯80%): 49 customers - Immediate action required
  • ⚠️ Medium Risk (50-79%): 1,512 customers - Proactive retention
  • πŸ“Š Low Risk (30-49%): 1,110 customers - Loyalty programs
  • βœ… Safe (<30%): 4,372 customers - Upselling opportunities

πŸ”§ Features (45 total)

The model uses 45 features including:

  • Demographics (Age, Gender, Partner, Dependents)
  • Services (Phone, Internet, Security, Streaming)
  • Account (Contract, Payment method, Billing)
  • Financial (Tenure, Monthly charges, Total charges)

πŸ’Ό Business Impact

  • Customer Retention: Identify at-risk customers early
  • Revenue Protection: Prevent churn-related revenue loss
  • Campaign Optimization: Target retention efforts effectively
  • ROI: Expected 300-400% return with targeted campaigns

πŸ—οΈ Model Details

  • Algorithm: Logistic Regression
  • Training Data: 5,634 samples
  • Test Data: 1,409 samples
  • Training Date: 2025-07-10

πŸ“‹ Usage

See the demo above for interactive predictions!

For batch processing:

# Load model
model = joblib.load('model.joblib')

# Prepare data with all 45 features
results = model.predict_proba(customer_features)[:, 1]

# Categorize risk
def categorize_risk(prob):
    if prob >= 0.8: return "High Risk"
    elif prob >= 0.5: return "Medium Risk"
    elif prob >= 0.3: return "Low Risk"
    else: return "Safe"

πŸ“œ License

MIT License - Free for commercial and academic use.