(Click above to test the deployed model)
This project implements a production-grade Machine Learning pipeline to predict student dropout and academic success using the UCI Predict Students' Dropout and Academic Success dataset.
V2 Updates:
- Advanced Feature Engineering: Interaction ratios and semester aggregations.
- Class Imbalance Handling: SMOTE applied to training data.
- Stacking Ensemble: Combines XGBoost, LightGBM, and CatBoost with a Logistic Regression meta-learner.
- AWS Lambda Support: Dockerfile and guide for serverless deployment.
- Input Validation: Strict Pydantic validation for API inputs.
graph TD
A[Raw Data] --> B(Data Pipeline)
B --> C{Feature Engineering}
C -->|SMOTE & Scaling| D[Processed Data]
D --> E[Stacking Ensemble]
E --> F[Model Artifact .pkl]
F --> G[Docker Container]
G --> H[AWS ECR]
H --> I[AWS Lambda]
I --> J((Public API))
- Best Model: Hyper-Tuned Stacking Ensemble
- Accuracy: 77.54%
- F1-Score: 0.7724
- ROC-AUC: 0.8579
data/: Dataset storage (raw and processed_v2)src/: Source codedata/: Data loadingfeatures/: Feature engineering (advanced_features.py)models/:train_pipeline.py: Unified Training Pipelineexperiments/: Legacy experiments and individual model scripts
api/: FastAPI application with validation
notebooks/: Exploratory Data Analysisreports/: Generated figures and plotstests/: Unit and integration tests
- Python 3.9+
- Docker (optional)
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Download Data:
python3 src/data/make_dataset.py
- Process Data (V2):
python3 src/features/advanced_features.py
- Train & Package (Unified Pipeline):
This script loads data, optimizes hyperparameters, trains the stacking ensemble, evaluates it, saves the artifact, and prints deployment instructions.
python3 src/models/train_pipeline.py
- Run Locally:
uvicorn src.api.main:app --reload
- Deploy to AWS Lambda (Docker):
- See aws_deployment.md.
This project includes a simple HTML/JS frontend (index.html) to interact with the live API.
How to use:
- Locally: Simply double-click
index.htmlto open it in your browser. - Online: If deployed to GitHub Pages, visit
https://YOUR_USERNAME.github.io/Student-Success-AI/.
Note: The frontend connects to the AWS Lambda URL configured in the JS code.