# saicharan2442/heart-attack-predection architecture

> Architecture diagram of the GitHub repository saicharan2442/heart-attack-predection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saicharan2442/heart-attack-predection
- Repository: https://github.com/saicharan2442/heart-attack-predection

## Overview

##### Main Components
- Data Source: Start with the CSV file ("data set 1.csv") as your raw data input.
- Data Handling/Preprocessing: Although preprocessing isn’t explicitly separated into its own module, it’s implicitly present in all the notebooks where data is loaded, cleaned, and prepared.
- Model Experiments: Each notebook (e.g., ANN.ipynb, DecisionTree.ipynb, GBM .ipynb, KNN.ipynb, etc.) represents a discrete experiment with a different machine learning model.
- Main Orchestrator: The "main.ipynb" notebook may serve as a summary or orchestration point, comparing model results and possibly aggregating output.
- Evaluation Module: The README shows that each model’s accuracy is computed, so include an "Evaluation" or "Results" component that captures these metric outputs.

##### Relationships and Data Flow
- Optionally, if “main.ipynb” combines these results, include it as the central aggregator that receives outputs from all model experiment blocks.

##### Architectural Patterns
- Modularity: Emphasize that each ML model is implemented as a separate module (Jupyter Notebook), allowing for independent experimentation.
- Pipeline Flow: The project follows a pipeline model—from data ingestion, through preprocessing and training, to evaluation.
- Comparison: The separate evaluation outputs are consolidated to make a final decision or to compare performance across different models.

##### Relevant Technologies and Details
- Tools/Frameworks: Note that since these are Jupyter Notebooks, Python libraries such as scikit-learn, TensorFlow/Keras (for ANN), and others are likely in use, even if not explicitly named.
- Data Manipulation: Pandas or NumPy might be referenced in the notebooks for handling CSV data.
- Evaluation Metrics: Accuracy is the key metric shown in the README; this is a crucial part of the evaluation component.

##### Elements

1. Data source ("data set 1.csv").
2. Pass through a shared (or individual within each notebook) data preprocessing/feature engineering stage.
3. Branch out into multiple parallel modules—notebooks—each representing a specific machine learning model experiment.
4. Conclude with an evaluation module that compiles accuracy metrics and comparisons, possibly orchestrated by the "main.ipynb".

## Diagram (Mermaid)

```mermaid
flowchart TD
    DS["Data Source (data set 1.csv)"]:::data
    DP["Data Preprocessing"]:::preprocess

    subgraph "Model Experiments"
        LR["Logistic Regression Model"]:::model
        ANN["ANN Model"]:::model
        DT["Decision Tree Model"]:::model
        GBM["Gradient Boosting Model"]:::model
        KNN["KNN Model"]:::model
        NB["Naive Bayes Model"]:::model
        RF["Random Forest Model"]:::model
        SVM["SVM Model"]:::model
    end

    EM["Evaluation & Orchestration (main.ipynb)"]:::evaluation

    DS -->|"loads"| DP
    DP -->|"prepares"| LR
    DP -->|"prepares"| ANN
    DP -->|"prepares"| DT
    DP -->|"prepares"| GBM
    DP -->|"prepares"| KNN
    DP -->|"prepares"| NB
    DP -->|"prepares"| RF
    DP -->|"prepares"| SVM

    LR -->|"accuracy"| EM
    ANN -->|"accuracy"| EM
    DT -->|"accuracy"| EM
    GBM -->|"accuracy"| EM
    KNN -->|"accuracy"| EM
    NB -->|"accuracy"| EM
    RF -->|"accuracy"| EM
    SVM -->|"accuracy"| EM

    click DS "https://github.com/saicharan2442/heart-attack-predection/blob/main/data set 1.csv"
    click LR "https://github.com/saicharan2442/heart-attack-predection/blob/main/LOGICAL REGRESSION .ipynb"
    click ANN "https://github.com/saicharan2442/heart-attack-predection/blob/main/ANN.ipynb"
    click DT "https://github.com/saicharan2442/heart-attack-predection/blob/main/DecisionTree.ipynb"
    click GBM "https://github.com/saicharan2442/heart-attack-predection/blob/main/GBM .ipynb"
    click KNN "https://github.com/saicharan2442/heart-attack-predection/blob/main/KNN.ipynb"
    click NB "https://github.com/saicharan2442/heart-attack-predection/blob/main/Navie Bayes .ipynb"
    click RF "https://github.com/saicharan2442/heart-attack-predection/blob/main/RABDOM FOREST.ipynb"
    click SVM "https://github.com/saicharan2442/heart-attack-predection/blob/main/SVM.ipynb"
    click EM "https://github.com/saicharan2442/heart-attack-predection/blob/main/main.ipynb"

    classDef data fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef preprocess fill:#66ccff,stroke:#333,stroke-width:2px;
    classDef model fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef evaluation fill:#ff9999,stroke:#333,stroke-width:2px;
```
