# arpanchaudhari/customer-churn-prediction architecture

> Architecture diagram of the GitHub repository arpanchaudhari/customer-churn-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arpanchaudhari/customer-churn-prediction
- Repository: https://github.com/arpanchaudhari/customer-churn-prediction

## Overview

This is a customer-churn prediction project with a notebook-based analysis and model-training workflow, an individual-customer risk app, and an executive analytics dashboard. The individual workflow collects a customer profile, scores churn risk, explores variable-by-variable scenarios, and keeps recent predictions. The dashboard scores the customer dataset, summarizes risk, and provides an intervention list. The notebook is documented as covering EDA through evaluation, but its implementation was not sampled; its internal stages and links are therefore limited to README-supported relationships.

Main entry points: [`notebook/01_Full_ML_Pipeline.ipynb`](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb) (ML pipeline notebook), [`notebook/app.py`](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py) (Risk scoring), [`notebook/pages/1_📊_Executive_Dashboard.py`](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py) (Dataset scoring), [`data/Telco-Customer-Churn.csv`](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/data/Telco-Customer-Churn.csv) (Telco churn data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Model development"]
  node_notebook["ML pipeline notebook"]
  node_eda["Exploratory analysis"]
  node_preprocess["Data preprocessing"]
  node_training["Model training"]
  node_evaluation["Model evaluation"]
end

subgraph group_prediction["Individual prediction"]
  node_profile["Customer profile<br/>[app.py]"]
  node_scorer["Risk scoring<br/>[app.py]"]
  node_scenarios["Risk scenarios<br/>[app.py]"]
  node_history["Prediction history<br/>[app.py]"]
end

subgraph group_analytics["Portfolio analytics"]
  node_exec_load["Dataset scoring"]
  node_filters["Customer filters"]
  node_kpis["Risk KPIs"]
  node_charts["Risk visualizations"]
  node_intervention["Intervention list"]
end

subgraph group_assets["Data and model assets"]
  node_dataset["Telco churn data"]
  node_model["Trained model<br/>[churn_model.pkl]"]
  node_scaler["Feature scaler<br/>[scaler.pkl]"]
  node_columns["Expected features"]
end

node_user(("Business user"))

node_user -->|"enters profile"| node_profile
node_profile -->|"scores profile"| node_scorer
node_scorer -->|"varies inputs"| node_scenarios
node_scorer -->|"records result"| node_history
node_model -->|"predicts with"| node_scorer
node_scaler -->|"scales features"| node_scorer
node_columns -->|"defines features"| node_scorer
node_user -->|"views dashboard"| node_exec_load
node_dataset -->|"loads rows"| node_exec_load
node_model -->|"predicts with"| node_exec_load
node_scaler -->|"scales features"| node_exec_load
node_columns -->|"aligns features"| node_exec_load
node_exec_load -->|"filters customers"| node_filters
node_filters -->|"aggregates risk"| node_kpis
node_filters -->|"visualizes risk"| node_charts
node_filters -->|"selects high risk"| node_intervention
node_user -->|"runs analysis"| node_notebook
node_dataset -.->|"analyzes history"| node_notebook
node_notebook -->|"includes EDA"| node_eda
node_notebook -->|"preprocesses data"| node_preprocess
node_notebook -->|"trains models"| node_training
node_notebook -->|"evaluates models"| node_evaluation

click node_notebook "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb"
click node_eda "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb"
click node_preprocess "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb"
click node_training "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb"
click node_evaluation "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb"
click node_profile "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py"
click node_scorer "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py"
click node_scenarios "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py"
click node_history "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py"
click node_exec_load "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py"
click node_filters "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py"
click node_kpis "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py"
click node_charts "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py"
click node_intervention "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py"
click node_dataset "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/data/Telco-Customer-Churn.csv"
click node_model "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/churn_model.pkl"
click node_scaler "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/scaler.pkl"
click node_columns "https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/expected_columns.pkl"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_notebook,node_eda,node_preprocess,node_training,node_evaluation,node_user toneBlue
class node_profile,node_scorer,node_scenarios,node_history toneAmber
class node_exec_load,node_filters,node_kpis,node_charts,node_intervention toneMint
class node_dataset,node_model,node_scaler,node_columns toneRose
```

## Components

### Model development

- [ML pipeline notebook](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb): `notebook/01_Full_ML_Pipeline.ipynb`
- [Exploratory analysis](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb): `notebook/01_Full_ML_Pipeline.ipynb`
- [Data preprocessing](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb): `notebook/01_Full_ML_Pipeline.ipynb`
- [Model training](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb): `notebook/01_Full_ML_Pipeline.ipynb`
- [Model evaluation](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/01_Full_ML_Pipeline.ipynb): `notebook/01_Full_ML_Pipeline.ipynb`

### Individual prediction

- [Customer profile](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py): `notebook/app.py`
- [Risk scoring](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py): `notebook/app.py`
- [Risk scenarios](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py): `notebook/app.py`
- [Prediction history](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/app.py): `notebook/app.py`

### Portfolio analytics

- [Dataset scoring](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py): `notebook/pages/1_📊_Executive_Dashboard.py`
- [Customer filters](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py): `notebook/pages/1_📊_Executive_Dashboard.py`
- [Risk KPIs](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py): `notebook/pages/1_📊_Executive_Dashboard.py`
- [Risk visualizations](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py): `notebook/pages/1_📊_Executive_Dashboard.py`
- [Intervention list](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/pages/1_%F0%9F%93%8A_Executive_Dashboard.py): `notebook/pages/1_📊_Executive_Dashboard.py`

### Data and model assets

- [Telco churn data](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/data/Telco-Customer-Churn.csv): `data/Telco-Customer-Churn.csv`
- [Trained model](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/churn_model.pkl): `notebook/churn_model.pkl`
- [Feature scaler](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/scaler.pkl): `notebook/scaler.pkl`
- [Expected features](https://github.com/arpanchaudhari/customer-churn-prediction/blob/main/notebook/expected_columns.pkl): `notebook/expected_columns.pkl`

### Other components

- **Business user**

## Connections

- Business user → Customer profile: enters profile (evidence: `notebook/app.py`)
- Customer profile → Risk scoring: scores profile (evidence: `notebook/app.py`)
- Risk scoring → Risk scenarios: varies inputs (evidence: `notebook/app.py`)
- Risk scoring → Prediction history: records result (evidence: `notebook/app.py`)
- Trained model → Risk scoring: predicts with (evidence: `notebook/app.py`)
- Feature scaler → Risk scoring: scales features (evidence: `notebook/app.py`)
- Expected features → Risk scoring: defines features (evidence: `notebook/app.py`)
- Business user → Dataset scoring: views dashboard (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Telco churn data → Dataset scoring: loads rows (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Trained model → Dataset scoring: predicts with (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Feature scaler → Dataset scoring: scales features (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Expected features → Dataset scoring: aligns features (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Dataset scoring → Customer filters: filters customers (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Customer filters → Risk KPIs: aggregates risk (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Customer filters → Risk visualizations: visualizes risk (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Customer filters → Intervention list: selects high risk (evidence: `notebook/pages/1_📊_Executive_Dashboard.py`)
- Business user → ML pipeline notebook: runs analysis (evidence: `README.md`)
- Telco churn data → ML pipeline notebook: analyzes history (evidence: `README.md`)
- ML pipeline notebook → Exploratory analysis: includes EDA (evidence: `README.md`)
- ML pipeline notebook → Data preprocessing: preprocesses data (evidence: `README.md`)
- ML pipeline notebook → Model training: trains models (evidence: `README.md`)
- ML pipeline notebook → Model evaluation: evaluates models (evidence: `README.md`)
