How skarshad1928/telco-churn-api works
This repository is a telecom churn prediction and retention application. A customer service representative enters a customer profile in the Streamlit portal; it sends the profile to the FastAPI endpoint, which assigns a cluster, scales features, and returns churn probability and risk tier for the portal’s retention guidance. Separately, a Dash dashboard filters the customer dataset and presents churn and value analytics. The README describes training and feature-engineering stages, but the available source does not expose their implementation; the graph focuses on the shipped prediction and analytics paths.
Main entry points: app.py Prediction endpoint · dashboard.py Retention portal · visual.py Churn analytics · kmeans_cluster_model.pkl K-Means model
Components 10
Prediction API
- Prediction endpoint
app.py - K-Means model
kmeans_cluster_model.pkl - Feature scaler
scaler.pkl - Churn model
optimal_logistic_reg_model.pkl
User Interfaces
- Retention portal
dashboard.py - Retention guidance
dashboard.py
Analytics Data
- Telco customer data
Telco_customer_churn.xlsx - Churn analytics
visual.py
Other components
- Service representative
- Business analyst
Connections 9
- Service representative → Retention portal: enters profile
README.md - Retention portal → Prediction endpoint: posts prediction
dashboard.py - Prediction endpoint → K-Means model: assigns cluster
app.py - Prediction endpoint → Feature scaler: scales features
app.py - Prediction endpoint → Churn model: predicts risk
app.py - Prediction endpoint → Retention portal: returns scores
dashboard.py - Retention portal → Retention guidance: shows actions
dashboard.py - Business analyst → Churn analytics: filters insights
README.md - Churn analytics → Telco customer data: reads records
visual.py