| --- |
| title: Customer Churn Survival Analysis |
| emoji: π |
| colorFrom: yellow |
| colorTo: indigo |
| sdk: gradio |
| sdk_version: 4.44.0 |
| app_file: app.py |
| pinned: false |
| short_description: Customer Churn Prediction and Explainability |
| python_version: "3.12" |
| --- |
| |
| # π Customer Churn Survival Analysis |
|
|
| Complete analysis of churn risk using **XAI (SHAP)** and **Survival Analysis**. |
|
|
| ## π― Features |
|
|
| - **Explainable AI**: It explains *why* a customer has been classified as churner or non-churner, given the information present in the dataset |
| - **Survival Analysis**: It predicts *when* a customer is likely to churn and *how much* risk there is |
| - **Interactive Visualizations**: Plots shown with Gradio |
|
|
| ## π How to Use It |
|
|
| 1. Choose between "Random Customer" or "Specific Customer" |
| 2. Click on "Analyze Customer" |
| 3. Explore the results in 3 tabs: |
| - **XAI**: SHAP values |
| - **Survival Analysis**: Risk timeline and Survival Probability Distribution through time |
| - **Details**: Customer Feature Values |
|
|
| ## π οΈ Models |
|
|
| - **XGBoost Classifier**: Churn Prediction |
| - **Cox Proportional Hazards**: Survival analysis |
| - **SHAP**: Explainability |
|
|
| ## π Dataset |
|
|
| Bank Customer Churn dataset with 200 test customers. |
|
|