# darshankamate1254/customer-churn-prediction-system- architecture

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

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

## Overview

This repository is a customer-churn ML pipeline: it cleans and splits Telco data, engineers features, trains and logs three classifiers, and exposes saved-model scoring through a Streamlit UI. The UI supports individual and CSV batch scoring, risk recommendations, and downloadable results; evaluation utilities generate classification plots and SHAP analysis. Training-to-preprocessing and training-to-feature-pipeline calls are visible in source. The README documents EDA, MLflow, and app capabilities; unsampled evaluation or notebook wiring is not inferred.

Main entry points: [`src/train.py`](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/train.py) (Model training), [`app/app.py`](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py) (Scoring UI), [`models/README.md`](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/models/README.md) (Saved models), [`src/preprocess.py`](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/preprocess.py) (Data cleaning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_rawdata["Telco dataset<br/>[README.md]"]
  node_clean["Data cleaning<br/>[preprocess.py]"]
  node_split["Train/test split<br/>[preprocess.py]"]
  node_eda["Exploratory analysis<br/>[01_eda.ipynb]"]
end

subgraph group_ml["Modeling and evaluation"]
  node_features["Feature pipeline<br/>[features.py]"]
  node_training["Model training<br/>[train.py]"]
  node_evaluation["Model evaluation<br/>[evaluate.py]"]
end

subgraph group_serving["Scoring experience"]
  node_streamlit["Scoring UI<br/>[app.py]"]
  node_single["Single scoring<br/>[app.py]"]
  node_batch["Batch scoring<br/>[app.py]"]
  node_recommend["Risk recommendations<br/>[app.py]"]
  node_results["Score results<br/>[app.py]"]
end

subgraph group_ops["Artifacts and tracking"]
  node_models["Saved models<br/>[README.md]"]
  node_mlflow[("MLflow tracking")]
end

node_analyst(("Analyst"))

node_analyst -->|"explores data"| node_eda
node_analyst -->|"starts training"| node_training
node_rawdata -->|"loads and cleans"| node_clean
node_training -->|"calls cleaning"| node_clean
node_training -->|"calls splitting"| node_split
node_training -->|"builds pipeline"| node_features
node_clean -->|"returns cleaned data"| node_split
node_analyst -->|"opens app"| node_streamlit
node_streamlit -->|"loads model"| node_models
node_streamlit -->|"selects mode"| node_single
node_streamlit -->|"selects mode"| node_batch
node_single -->|"predicts probability"| node_models
node_batch -->|"scores customers"| node_models
node_single -->|"assigns risk actions"| node_recommend
node_single -->|"displays gauge"| node_results
node_batch -->|"exports scores"| node_results
node_training -->|"saves pipelines"| node_models
node_training -->|"logs runs and models"| node_mlflow
node_evaluation -->|"logs plot artifacts"| node_mlflow

click node_rawdata "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/data/raw/README.md"
click node_clean "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/preprocess.py"
click node_split "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/preprocess.py"
click node_eda "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/notebooks/01_eda.ipynb"
click node_features "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/features.py"
click node_training "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/train.py"
click node_evaluation "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/evaluate.py"
click node_streamlit "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py"
click node_single "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py"
click node_batch "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py"
click node_recommend "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py"
click node_results "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py"
click node_models "https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/models/README.md"

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_rawdata,node_clean,node_split,node_eda toneBlue
class node_features,node_training,node_evaluation toneAmber
class node_streamlit,node_single,node_batch,node_recommend,node_results toneMint
class node_models,node_mlflow toneRose
class node_analyst toneIndigo
```

## Components

### Data preparation

- [Telco dataset](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/data/raw/README.md): `data/raw/README.md`
- [Data cleaning](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/preprocess.py): `src/preprocess.py`
- [Train/test split](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/preprocess.py): `src/preprocess.py`
- [Exploratory analysis](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/notebooks/01_eda.ipynb): `notebooks/01_eda.ipynb`

### Modeling and evaluation

- [Feature pipeline](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/features.py): `src/features.py`
- [Model training](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/train.py): `src/train.py`
- [Model evaluation](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/src/evaluate.py): `src/evaluate.py`

### Scoring experience

- [Scoring UI](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py): `app/app.py`
- [Single scoring](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py): `app/app.py`
- [Batch scoring](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py): `app/app.py`
- [Risk recommendations](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py): `app/app.py`
- [Score results](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/app/app.py): `app/app.py`

### Artifacts and tracking

- [Saved models](https://github.com/darshankamate1254/customer-churn-prediction-system-/blob/main/models/README.md): `models/README.md`
- **MLflow tracking**

### Other components

- **Analyst**

## Connections

- Analyst → Exploratory analysis: explores data (evidence: `README.md`)
- Analyst → Model training: starts training (evidence: `README.md`)
- Telco dataset → Data cleaning: loads and cleans
- Model training → Data cleaning: calls cleaning (evidence: `src/train.py`)
- Model training → Train/test split: calls splitting (evidence: `src/train.py`)
- Model training → Feature pipeline: builds pipeline (evidence: `src/train.py`)
- Data cleaning → Train/test split: returns cleaned data (evidence: `src/preprocess.py`)
- Analyst → Scoring UI: opens app (evidence: `README.md`)
- Scoring UI → Saved models: loads model (evidence: `app/app.py`)
- Scoring UI → Single scoring: selects mode (evidence: `app/app.py`)
- Scoring UI → Batch scoring: selects mode (evidence: `app/app.py`)
- Single scoring → Saved models: predicts probability (evidence: `app/app.py`)
- Batch scoring → Saved models: scores customers (evidence: `app/app.py`)
- Single scoring → Risk recommendations: assigns risk actions (evidence: `app/app.py`)
- Single scoring → Score results: displays gauge (evidence: `app/app.py`)
- Batch scoring → Score results: exports scores (evidence: `app/app.py`)
- Model training → Saved models: saves pipelines (evidence: `src/train.py`)
- Model training → MLflow tracking: logs runs and models (evidence: `src/train.py`)
- Model evaluation → MLflow tracking: logs plot artifacts (evidence: `src/evaluate.py`)
