# koteeswarar/heart-disease-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/koteeswarar/heart-disease-prediction
- Repository: https://github.com/koteeswarar/heart-disease-prediction

## Overview

This repository is a notebook-based heart-disease classification project. Its documented workflow loads the Cleveland dataset, cleans and encodes it, splits the data, trains a decision tree, and presents model evaluation and visualizations; pruning is also documented. The tree reflects README-described relationships only: no notebook source excerpts were available to verify implementation details or finer control flow.

Main entry points: [`HeartDiseasePrediction.ipynb`](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb) (Decision tree)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_prep["Data preparation"]
  node_loading["Data loading"]
  node_cleaning["Data cleaning"]
  node_eda["Exploratory analysis"]
  node_encoding["Feature encoding"]
  node_target["Target conversion"]
end

subgraph group_modeling["Modeling"]
  node_split["Train-test split"]
  node_tree["Decision tree"]
  node_pruning["Cost-complexity pruning"]
end

subgraph group_evaluation["Evaluation"]
  node_evaluation["Confusion matrix"]
  node_visualization["Tree visualization"]
end

node_user(("Analyst"))
node_uci[("UCI dataset")]

node_user -->|"runs analysis"| node_loading
node_uci -->|"provides data"| node_loading
node_loading -->|"cleans data"| node_cleaning
node_cleaning -->|"explores data"| node_eda
node_cleaning -->|"encodes features"| node_encoding
node_encoding -->|"converts target"| node_target
node_target -->|"splits data"| node_split
node_split -->|"trains classifier"| node_tree
node_tree -->|"prunes model"| node_pruning
node_tree -->|"evaluates with"| node_evaluation
node_tree -->|"plots tree"| node_visualization

click node_loading "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_cleaning "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_eda "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_encoding "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_target "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_split "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_tree "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_pruning "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_evaluation "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"
click node_visualization "https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb"

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_loading,node_cleaning,node_eda,node_encoding,node_target toneBlue
class node_split,node_tree,node_pruning,node_uci toneAmber
class node_evaluation,node_visualization toneMint
class node_user toneIndigo
```

## Components

### Data preparation

- [Data loading](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Data cleaning](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Exploratory analysis](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Feature encoding](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Target conversion](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`

### Modeling

- [Train-test split](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Decision tree](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Cost-complexity pruning](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`

### Evaluation

- [Confusion matrix](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`
- [Tree visualization](https://github.com/koteeswarar/heart-disease-prediction/blob/main/HeartDiseasePrediction.ipynb): `HeartDiseasePrediction.ipynb`

### Other components

- **Analyst**
- **UCI dataset**

## Connections

- Analyst → Data loading: runs analysis (evidence: `README.md`)
- UCI dataset → Data loading: provides data (evidence: `README.md`)
- Data loading → Data cleaning: cleans data (evidence: `README.md`)
- Data cleaning → Exploratory analysis: explores data (evidence: `README.md`)
- Data cleaning → Feature encoding: encodes features (evidence: `README.md`)
- Feature encoding → Target conversion: converts target (evidence: `README.md`)
- Target conversion → Train-test split: splits data (evidence: `README.md`)
- Train-test split → Decision tree: trains classifier (evidence: `README.md`)
- Decision tree → Cost-complexity pruning: prunes model (evidence: `README.md`)
- Decision tree → Confusion matrix: evaluates with (evidence: `README.md`)
- Decision tree → Tree visualization: plots tree (evidence: `README.md`)
