# ashwinssj/disease-classification- architecture

> Architecture diagram of the GitHub repository ashwinssj/disease-classification-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashwinssj/disease-classification-
- Repository: https://github.com/ashwinssj/disease-classification-

## Overview

##### Main Components
- Data Sources: The two CSV files (Training.csv and Testing.csv) represent the raw datasets.
- Data Preprocessing: Steps that involve cleaning, handling missing values, and generating visualizations.
- Machine Learning Pipeline:
- Model Training Module: Training the Random Forest classifier.
- PCA Module: Applying Principal Component Analysis to reduce dimensionality of features.
- Evaluation Module: Generation of performance metrics (accuracy, precision, recall, F1-score) and confusion matrices.
- Notebook Controller: The Jupyter Notebook (which_disease_do_you_have_100_accuracy.ipynb) that orchestrates the entire pipeline.

##### Relationships and Data Flow
- The CSV files feed into the Data Preprocessing component.
- The preprocessed data splits into two paths: one directly to the Model Training Module and one to the PCA Module (with its own subsequent model training step).
- The outputs from both the direct training and the PCA-based training are then evaluated.

##### Important Architectural Patterns
- Single Notebook Orchestration: Since the notebook coordinates all the steps, it can be represented as a control layer that integrates the components.
- Modularity: Despite being implemented in one notebook, logically separate the data processing, training, PCA transformation, and evaluation components.

##### Relevant Technologies and Libraries
- Python and its code environment (Jupyter Notebook).
- scikit-learn for the Random Forest classifier, PCA, and hyperparameter tuning (via RandomizedSearchCV).
- Pandas for data manipulation.

- Clearly separate the main components: source data, preprocessing, parallel model pipelines (direct Random Forest vs. PCA-reduced Random Forest), and evaluation.
- That, despite the simplicity of the file layout, breaking down the notebook’s logic into modular components will clarify and convey the intended workflow effectively.

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["Notebook Controller"]:::controller
    subgraph "Data Sources"
        B(("Training.csv")):::datasource
        C(("Testing.csv")):::datasource
    end
    D["Data Preprocessing"]:::processing
    E["Random Forest Training\n(Hyperparameter Tuning)"]:::processing
    F["PCA Transformation\n(DimensionalityReduction)"]:::processing
    G["Random Forest Training (PCA)\n(Hyperparameter Tuning)"]:::processing
    H["Model Evaluation\n(Metrics&ConfusionMatrix)"]:::evaluation

    A --> B
    A --> C
    B --> D
    C --> D
    D --> E
    D --> F
    F --> G
    E --> H
    G --> H

    click A "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"
    click B "https://github.com/ashwinssj/disease-classification-/blob/main/Training.csv"
    click C "https://github.com/ashwinssj/disease-classification-/blob/main/Testing.csv"
    click D "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"
    click E "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"
    click F "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"
    click G "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"
    click H "https://github.com/ashwinssj/disease-classification-/blob/main/which_disease_do_you_have_100_accuracy.ipynb"

    classDef controller fill:#faa,stroke:#333,stroke-width:2px;
    classDef datasource fill:#cfc,stroke:#333,stroke-width:2px;
    classDef processing fill:#bbf,stroke:#333,stroke-width:2px;
    classDef evaluation fill:#ffb,stroke:#333,stroke-width:2px;
```
