# arpitatandon-ds/diabetic_predictive_model architecture

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

- Interactive diagram: https://gitdiagram.com/arpitatandon-ds/diabetic_predictive_model
- Repository: https://github.com/arpitatandon-ds/diabetic_predictive_model

## Overview

This repository provides two separate Streamlit apps: a login-gated SVM screening workflow with probability, PDF reports and prediction history, and a Random Forest analysis app for exploring and evaluating the dataset. The prediction app loads and standardizes the dataset, trains and evaluates its model, then applies it to patient-entered features. The analysis app cleans data, presents visualizations, and evaluates a separate model. The apps and their internal stages are evidenced by the README and excerpts; generated local files are described in the README, not present in the tree.

Main entry points: [`myapp.py`](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py) (Prediction App), [`View_data.py`](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py) (Analysis App), [`Database/diabetes.csv`](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/Database/diabetes.csv) (Diabetes Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screening["Patient Screening"]
  node_prediction_app["Prediction App<br/>[myapp.py]"]
  node_authentication["Login and Register<br/>[myapp.py]"]
  node_svm_model["SVM Training<br/>[myapp.py]"]
  node_patient_inputs["Patient Inputs<br/>[myapp.py]"]
  node_prediction["Prediction Result<br/>[myapp.py]"]
  node_pdf_report["PDF Report<br/>[myapp.py]"]
  node_history[("Prediction History<br/>[myapp.py]")]
  node_account_store[("Account Storage<br/>[myapp.py]")]
end

subgraph group_analysis["Data Analysis"]
  node_analysis_app["Analysis App<br/>[View_data.py]"]
  node_cleaning["Data Cleaning<br/>[View_data.py]"]
  node_visualizations["Dataset Visualizations<br/>[View_data.py]"]
  node_random_forest["Random Forest<br/>[View_data.py]"]
  node_model_evaluation["Model Evaluation<br/>[View_data.py]"]
  node_feature_importance["Feature Importance<br/>[View_data.py]"]
end

subgraph group_shared_data["Dataset"]
  node_diabetes_data[("Diabetes Dataset<br/>[diabetes.csv]")]
end

node_user(("App User"))

node_user -->|"uses"| node_prediction_app
node_user -->|"uses"| node_analysis_app
node_prediction_app -->|"checks access"| node_authentication
node_authentication -->|"loads and saves"| node_account_store
node_prediction_app -->|"loads"| node_diabetes_data
node_prediction_app -->|"trains and evaluates"| node_svm_model
node_prediction_app -->|"collects"| node_patient_inputs
node_prediction_app -->|"applies scaled inputs"| node_svm_model
node_prediction_app -->|"shows result"| node_prediction
node_prediction_app -->|"generates report"| node_pdf_report
node_prediction_app -->|"saves and downloads"| node_history
node_analysis_app -->|"loads"| node_diabetes_data
node_analysis_app -->|"cleans"| node_cleaning
node_analysis_app -->|"renders"| node_visualizations
node_analysis_app -->|"trains"| node_random_forest
node_analysis_app -->|"evaluates"| node_model_evaluation
node_analysis_app -->|"displays"| node_feature_importance
node_cleaning -->|"prepares data for"| node_visualizations
node_random_forest -->|"predicts for"| node_model_evaluation
node_random_forest -->|"provides importances"| node_feature_importance

click node_prediction_app "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_authentication "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_svm_model "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_patient_inputs "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_prediction "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_pdf_report "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_history "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_account_store "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py"
click node_analysis_app "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_cleaning "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_visualizations "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_random_forest "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_model_evaluation "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_feature_importance "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py"
click node_diabetes_data "https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/Database/diabetes.csv"

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_prediction_app,node_authentication,node_svm_model,node_patient_inputs,node_prediction,node_pdf_report,node_history,node_account_store,node_user toneBlue
class node_analysis_app,node_cleaning,node_visualizations,node_random_forest,node_model_evaluation,node_feature_importance toneAmber
class node_diabetes_data toneMint
```

## Components

### Patient Screening

- [Prediction App](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [Login and Register](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [SVM Training](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [Patient Inputs](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [Prediction Result](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [PDF Report](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [Prediction History](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`
- [Account Storage](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/myapp.py): `myapp.py`

### Data Analysis

- [Analysis App](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`
- [Data Cleaning](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`
- [Dataset Visualizations](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`
- [Random Forest](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`
- [Model Evaluation](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`
- [Feature Importance](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/View_data.py): `View_data.py`

### Dataset

- [Diabetes Dataset](https://github.com/arpitatandon-ds/diabetic_predictive_model/blob/main/Database/diabetes.csv): `Database/diabetes.csv`

### Other components

- **App User**

## Connections

- App User → Prediction App: uses (evidence: `README.md`)
- App User → Analysis App: uses (evidence: `README.md`)
- Prediction App → Login and Register: checks access (evidence: `myapp.py`)
- Login and Register → Account Storage: loads and saves (evidence: `myapp.py`)
- Prediction App → Diabetes Dataset: loads (evidence: `README.md`)
- Prediction App → SVM Training: trains and evaluates (evidence: `myapp.py`)
- Prediction App → Patient Inputs: collects (evidence: `myapp.py`)
- Prediction App → SVM Training: applies scaled inputs (evidence: `myapp.py`)
- Prediction App → Prediction Result: shows result (evidence: `myapp.py`)
- Prediction App → PDF Report: generates report (evidence: `README.md`)
- Prediction App → Prediction History: saves and downloads (evidence: `README.md`)
- Analysis App → Diabetes Dataset: loads (evidence: `View_data.py`)
- Analysis App → Data Cleaning: cleans (evidence: `View_data.py`)
- Analysis App → Dataset Visualizations: renders (evidence: `View_data.py`)
- Analysis App → Random Forest: trains (evidence: `View_data.py`)
- Analysis App → Model Evaluation: evaluates (evidence: `View_data.py`)
- Analysis App → Feature Importance: displays (evidence: `View_data.py`)
- Data Cleaning → Dataset Visualizations: prepares data for (evidence: `View_data.py`)
- Random Forest → Model Evaluation: predicts for (evidence: `View_data.py`)
- Random Forest → Feature Importance: provides importances (evidence: `View_data.py`)
