# nitin-dhotre27/ml-student-graduate-dropout-analysis architecture

> Architecture diagram of the GitHub repository nitin-dhotre27/ml-student-graduate-dropout-analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nitin-dhotre27/ml-student-graduate-dropout-analysis
- Repository: https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis

## Overview

This repository predicts student dropout risk through a train-to-serve workflow: training loads student records, preprocesses features, tunes and fits a stacked classifier, and saves a deployable pipeline plus evaluation and feature-importance outputs. A FastAPI service loads that pipeline to return individual or batch predictions; the web client presents risk and model information. Synthetic-data generation supports a demonstration run. The graph follows documented and excerpted relationships; the frontend-to-API link is documented in the README, while internal frontend behavior was not sampled.

Main entry points: [`src/train.py`](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/train.py) (Training Workflow), [`backend/app.py`](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/backend/app.py) (FastAPI), [`src/inference.py`](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/inference.py) (Prediction Inference), [`src/config.py`](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/config.py) (Schema and Paths)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Student Data"]
  node_synthetic["Synthetic Data Generator"]
  node_records[("Training and Test Records")]
end

subgraph group_model["Model Training"]
  node_preprocess["Feature Preprocessing<br/>[preprocessing.py]"]
  node_trainer["Training Workflow<br/>[train.py]"]
  node_stacking["Stacked Model Tuning<br/>[train.py]"]
  node_config["Schema and Paths<br/>[config.py]"]
end

subgraph group_serving["Prediction Service"]
  node_web["Web Client<br/>[index.html]"]
  node_api["FastAPI<br/>[app.py]"]
  node_inference["Prediction Inference<br/>[inference.py]"]
end

subgraph group_outputs["Model Outputs"]
  node_pipeline[("Serialized Pipeline")]
  node_metrics["Evaluation Metrics<br/>[metrics.json]"]
  node_importance["Feature Importances"]
end

node_operator(("Operator"))
node_student(("Student"))
node_risk["Risk Result"]

node_operator -->|"generates data"| node_synthetic
node_synthetic -->|"writes records"| node_records
node_operator -->|"starts training"| node_trainer
node_trainer -->|"loads records"| node_records
node_trainer -->|"builds features"| node_preprocess
node_trainer -->|"tunes and fits"| node_stacking
node_trainer -->|"uses paths"| node_config
node_synthetic -->|"uses data paths"| node_config
node_preprocess -->|"uses schema"| node_config
node_trainer -->|"saves pipeline"| node_pipeline
node_trainer -->|"writes metrics"| node_metrics
node_trainer -->|"writes importances"| node_importance
node_web -->|"requests predictions"| node_api
node_student -.->|"enters features"| node_web
node_api -->|"requests predictions"| node_inference
node_api -->|"checks paths"| node_config
node_api -->|"reads metrics"| node_metrics
node_inference -->|"loads pipeline"| node_pipeline
node_inference -->|"reads importances"| node_importance
node_inference -->|"uses artifact paths"| node_config
node_inference -->|"returns risk"| node_risk
node_api -->|"serves prediction"| node_risk

click node_synthetic "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/generate_synthetic_data.py"
click node_records "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/tree/main/data"
click node_preprocess "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/preprocessing.py"
click node_trainer "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/train.py"
click node_stacking "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/train.py"
click node_config "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/config.py"
click node_pipeline "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/dropout_stack_pipeline.joblib"
click node_metrics "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/metrics.json"
click node_importance "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/feature_importance.json"
click node_web "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/frontend/index.html"
click node_api "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/backend/app.py"
click node_inference "https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/inference.py"

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_synthetic,node_records toneBlue
class node_preprocess,node_trainer,node_stacking,node_config toneAmber
class node_web,node_api,node_inference toneMint
class node_pipeline,node_metrics,node_importance toneRose
class node_operator,node_student,node_risk toneIndigo
```

## Components

### Student Data

- [Synthetic Data Generator](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/generate_synthetic_data.py): `src/generate_synthetic_data.py`
- [Training and Test Records](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/tree/main/data): `data`

### Model Training

- [Feature Preprocessing](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [Training Workflow](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/train.py): `src/train.py`
- [Stacked Model Tuning](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/train.py): `src/train.py`
- [Schema and Paths](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/config.py): `src/config.py`

### Prediction Service

- [Web Client](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/frontend/index.html): `frontend/index.html`
- [FastAPI](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/backend/app.py): `backend/app.py`
- [Prediction Inference](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/src/inference.py): `src/inference.py`

### Model Outputs

- [Serialized Pipeline](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/dropout_stack_pipeline.joblib): `models/dropout_stack_pipeline.joblib`
- [Evaluation Metrics](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/metrics.json): `models/metrics.json`
- [Feature Importances](https://github.com/nitin-dhotre27/ml-student-graduate-dropout-analysis/blob/main/models/feature_importance.json): `models/feature_importance.json`

### Other components

- **Operator**
- **Student**
- **Risk Result**

## Connections

- Operator → Synthetic Data Generator: generates data (evidence: `README.md`)
- Synthetic Data Generator → Training and Test Records: writes records (evidence: `src/generate_synthetic_data.py`)
- Operator → Training Workflow: starts training (evidence: `README.md`)
- Training Workflow → Training and Test Records: loads records (evidence: `src/train.py`)
- Training Workflow → Feature Preprocessing: builds features (evidence: `src/train.py`)
- Training Workflow → Stacked Model Tuning: tunes and fits (evidence: `src/train.py`)
- Training Workflow → Schema and Paths: uses paths (evidence: `src/train.py`)
- Synthetic Data Generator → Schema and Paths: uses data paths (evidence: `src/generate_synthetic_data.py`)
- Feature Preprocessing → Schema and Paths: uses schema (evidence: `src/preprocessing.py`)
- Training Workflow → Serialized Pipeline: saves pipeline (evidence: `src/train.py`)
- Training Workflow → Evaluation Metrics: writes metrics (evidence: `src/train.py`)
- Training Workflow → Feature Importances: writes importances (evidence: `src/train.py`)
- Web Client → FastAPI: requests predictions (evidence: `README.md`)
- Student → Web Client: enters features
- FastAPI → Prediction Inference: requests predictions (evidence: `backend/app.py`)
- FastAPI → Schema and Paths: checks paths (evidence: `backend/app.py`)
- FastAPI → Evaluation Metrics: reads metrics (evidence: `backend/app.py`)
- Prediction Inference → Serialized Pipeline: loads pipeline (evidence: `src/inference.py`)
- Prediction Inference → Feature Importances: reads importances (evidence: `src/inference.py`)
- Prediction Inference → Schema and Paths: uses artifact paths (evidence: `src/inference.py`)
- Prediction Inference → Risk Result: returns risk (evidence: `src/inference.py`)
- FastAPI → Risk Result: serves prediction (evidence: `backend/app.py`)
