# saharshps/alzheimer-s-disease-classification- architecture

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

- Interactive diagram: https://gitdiagram.com/saharshps/alzheimer-s-disease-classification-
- Repository: https://github.com/saharshps/alzheimer-s-disease-classification-

## Overview

This is a Streamlit application for predicting Alzheimer’s disease from patient-reported demographic, health, and cognitive features. The main workflow is: a user enters values, the app displays them, and—on request—calls a serialized LightGBM model and displays a prediction. The README also describes an offline analysis and modeling workflow covering EDA, preprocessing, model comparison, evaluation, cross-validation, tuning, and ROC-AUC analysis. Those capabilities are documented, but notebook internals were not sampled, so their detailed data flow is not asserted.

Main entry points: [`app.py`](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/app.py) (Prediction interface), [`alzheimers_disease_data.csv`](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimers_disease_data.csv) (Patient dataset), [`model.ipynb`](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb) (Data preprocessing), [`alzheimer_model.joblib`](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimer_model.joblib) (Trained model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Prediction app"]
  node_streamlit_app["Prediction interface<br/>[app.py]"]
  node_serialized_model[("Trained model")]
  node_prediction_result["Prediction result<br/>[app.py]"]
end

subgraph group_analysis["Data analysis"]
  node_dataset[("Patient dataset")]
  node_eda["Exploratory analysis"]
end

subgraph group_modeling["Model development"]
  node_preprocessing["Data preprocessing<br/>[model.ipynb]"]
  node_model_comparison["Model comparison<br/>[model.ipynb]"]
  node_evaluation["Model evaluation<br/>[model.ipynb]"]
  node_validation_tuning["Validation and tuning<br/>[model.ipynb]"]
  node_final_model["LightGBM selection<br/>[model.ipynb]"]
end

node_user(("User"))

node_user -->|"enters features"| node_streamlit_app
node_streamlit_app -->|"loads and predicts"| node_serialized_model
node_streamlit_app -->|"displays prediction"| node_prediction_result
node_dataset -.->|"analyzes data"| node_eda
node_dataset -.->|"prepares data"| node_preprocessing
node_preprocessing -.->|"feeds models"| node_model_comparison
node_model_comparison -.->|"compares metrics"| node_evaluation
node_evaluation -.->|"informs selection"| node_validation_tuning
node_validation_tuning -.->|"supports selection"| node_final_model
node_final_model -.->|"exports model"| node_serialized_model

click node_streamlit_app "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/app.py"
click node_serialized_model "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimer_model.joblib"
click node_prediction_result "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/app.py"
click node_dataset "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimers_disease_data.csv"
click node_eda "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/visualization.ipynb"
click node_preprocessing "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb"
click node_model_comparison "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb"
click node_evaluation "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb"
click node_validation_tuning "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb"
click node_final_model "https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.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_streamlit_app,node_serialized_model,node_prediction_result,node_user toneBlue
class node_dataset,node_eda toneAmber
class node_preprocessing,node_model_comparison,node_evaluation,node_validation_tuning,node_final_model toneMint
```

## Components

### Prediction app

- [Prediction interface](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/app.py): `app.py`
- [Trained model](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimer_model.joblib): `alzheimer_model.joblib`
- [Prediction result](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/app.py): `app.py`

### Data analysis

- [Patient dataset](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/alzheimers_disease_data.csv): `alzheimers_disease_data.csv`
- [Exploratory analysis](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/visualization.ipynb): `visualization.ipynb`

### Model development

- [Data preprocessing](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb): `model.ipynb`
- [Model comparison](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb): `model.ipynb`
- [Model evaluation](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb): `model.ipynb`
- [Validation and tuning](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb): `model.ipynb`
- [LightGBM selection](https://github.com/saharshps/alzheimer-s-disease-classification-/blob/main/model.ipynb): `model.ipynb`

### Other components

- **User**

## Connections

- User → Prediction interface: enters features (evidence: `app.py`)
- Prediction interface → Trained model: loads and predicts (evidence: `app.py`)
- Prediction interface → Prediction result: displays prediction (evidence: `app.py`)
- Patient dataset → Exploratory analysis: analyzes data
- Patient dataset → Data preprocessing: prepares data
- Data preprocessing → Model comparison: feeds models
- Model comparison → Model evaluation: compares metrics
- Model evaluation → Validation and tuning: informs selection
- Validation and tuning → LightGBM selection: supports selection
- LightGBM selection → Trained model: exports model
