# charanjeet-mvn/disease-prediction-from-symptoms architecture

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

- Interactive diagram: https://gitdiagram.com/charanjeet-mvn/disease-prediction-from-symptoms
- Repository: https://github.com/charanjeet-mvn/disease-prediction-from-symptoms

## Overview

This is a small symptom-to-disease prediction demo. Its main workflow loads tabular training and test data, trains a configured classifier, saves it, then evaluates it; a separate script predicts from a hard-coded symptom vector using a saved model. The README also describes a notebook workflow using a different dataset. Source excerpts show the main script and standalone inference, but not the notebook implementation or configuration contents.

Main entry points: [`main.py`](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py) (Train and evaluate), [`infer.py`](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/infer.py) (Symptom inference), [`notebook/Disease-Prediction-from-Symptoms-checkpoint.ipynb`](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/notebook/Disease-Prediction-from-Symptoms-checkpoint.ipynb) (Train and infer), [`saved_model`](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/tree/main/saved_model) (Saved classifiers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training and evaluation"]
  node_main["Train and evaluate<br/>[main.py]"]
  node_classifier["Classifier selection<br/>[main.py]"]
  node_metrics["Validation metrics<br/>[main.py]"]
end

subgraph group_inference["Prediction"]
  node_infer["Symptom inference<br/>[infer.py]"]
  node_symptoms["Hard-coded symptoms<br/>[infer.py]"]
  node_prediction(("Predicted disease"))
end

subgraph group_data["Data and artifacts"]
  node_training_data["Training data<br/>[training_data.csv]"]
  node_test_data["Test data<br/>[test_data.csv]"]
  node_config["Model configuration<br/>[config.yaml]"]
  node_saved_models["Saved classifiers"]
end

subgraph group_notebook["Notebook workflow"]
  node_notebook_workflow["Train and infer"]
  node_notebook_data["Columbia dataset<br/>[raw_data.xlsx]"]
end

node_developer(("Demo user"))

node_developer -->|"runs training"| node_main
node_main -->|"loads data"| node_training_data
node_main -->|"loads data"| node_test_data
node_main -->|"reads settings"| node_config
node_main -->|"selects and fits"| node_classifier
node_main -->|"evaluates model"| node_metrics
node_main -->|"saves classifier"| node_saved_models
node_developer -->|"runs inference"| node_infer
node_infer -->|"builds input"| node_symptoms
node_infer -->|"loads classifier"| node_saved_models
node_infer -->|"prints prediction"| node_prediction
node_developer -->|"opens demo"| node_notebook_workflow
node_notebook_workflow -->|"uses dataset"| node_notebook_data

click node_main "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py"
click node_classifier "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py"
click node_metrics "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py"
click node_infer "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/infer.py"
click node_training_data "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/dataset/training_data.csv"
click node_test_data "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/dataset/test_data.csv"
click node_config "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/config.yaml"
click node_saved_models "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/tree/main/saved_model"
click node_symptoms "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/infer.py"
click node_notebook_workflow "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/notebook/Disease-Prediction-from-Symptoms-checkpoint.ipynb"
click node_notebook_data "https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/notebook/dataset/raw_data.xlsx"

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_main,node_classifier,node_metrics,node_developer toneBlue
class node_infer,node_symptoms,node_prediction toneAmber
class node_training_data,node_test_data,node_config,node_saved_models toneMint
class node_notebook_workflow,node_notebook_data toneRose
```

## Components

### Training and evaluation

- [Train and evaluate](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py): `main.py`
- [Classifier selection](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py): `main.py`
- [Validation metrics](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/main.py): `main.py`

### Prediction

- [Symptom inference](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/infer.py): `infer.py`
- [Hard-coded symptoms](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/infer.py): `infer.py`
- **Predicted disease**

### Data and artifacts

- [Training data](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/dataset/training_data.csv): `dataset/training_data.csv`
- [Test data](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/dataset/test_data.csv): `dataset/test_data.csv`
- [Model configuration](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/config.yaml): `config.yaml`
- [Saved classifiers](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/tree/main/saved_model): `saved_model`

### Notebook workflow

- [Train and infer](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/notebook/Disease-Prediction-from-Symptoms-checkpoint.ipynb): `notebook/Disease-Prediction-from-Symptoms-checkpoint.ipynb`
- [Columbia dataset](https://github.com/charanjeet-mvn/disease-prediction-from-symptoms/blob/main/notebook/dataset/raw_data.xlsx): `notebook/dataset/raw_data.xlsx`

### Other components

- **Demo user**

## Connections

- Demo user → Train and evaluate: runs training (evidence: `README.md`)
- Train and evaluate → Training data: loads data (evidence: `main.py`)
- Train and evaluate → Test data: loads data (evidence: `main.py`)
- Train and evaluate → Model configuration: reads settings (evidence: `main.py`)
- Train and evaluate → Classifier selection: selects and fits (evidence: `main.py`)
- Train and evaluate → Validation metrics: evaluates model (evidence: `main.py`)
- Train and evaluate → Saved classifiers: saves classifier (evidence: `main.py`)
- Demo user → Symptom inference: runs inference (evidence: `README.md`)
- Symptom inference → Hard-coded symptoms: builds input (evidence: `infer.py`)
- Symptom inference → Saved classifiers: loads classifier (evidence: `infer.py`)
- Symptom inference → Predicted disease: prints prediction (evidence: `infer.py`)
- Demo user → Train and infer: opens demo (evidence: `README.md`)
- Train and infer → Columbia dataset: uses dataset (evidence: `README.md`)
