A full-stack machine learning application that predicts student academic performance.
Project Status: ✅ Complete
Predicting student academic performance enables personalized learning recommendations.
EduLens demonstrates a complete ML workflow: synthetic data generation → preprocessing → model training → evaluation → visualization.
- ✅ ML Models – Multiple Supervised ML Classifiers
- ✅ Imbalanced Data Handling – SMOTE for balanced class distribution
- ✅ Feature Engineering – PCA for dimensionality reduction
- ✅ Full-Stack Deployment – FastAPI backend + React frontend + SQL Server database
- ✅ Interactive Visualizations – Confusion matrices, ROC curves, model comparison charts, correlation heatmaps
- ✅ Automated Reports – PDF performance reports with model insights
- ✅ Training History – Persistent storage of model metrics and predictions
- ✅ Real-Time Predictions – Predict student grades with trained models
During Training
Note: All models trained on balanced student records. SVM achieved best performance after SMOTE optimization and PCA feature reduction.
| Component | Technology |
|---|---|
| Backend | Python 3.10+, FastAPI, NumPy, Pandas, Scikit-learn |
| ML Pipeline | SMOTE, PCA, Ensemble Approach, Model Evaluation |
| Frontend | React 18, Vite, Plotly (Data Visualization), CSS3 |
| Database | Microsoft SQL Server |
| Deployment | REST API, Web Interface |
Smart-Academic-Prediction/
│
├── backend/
│ ├── app.py # FastAPI application & API routes
│ ├── database.py # SQL Server connection & queries
│ ├── preprocessing.py # Data cleaning & feature engineering
│ ├── ml_models.py # Model training & evaluation
│ ├── generate_dataset.py # Synthetic data generation
│ ├── requirements.txt # Python dependencies
│ └── data/
│ └── student_data.csv # Synthetic dataset (2,000 records)
│
├── frontend/
│ └── edulens/
│ ├── package.json
│ ├── vite.config.js
│ ├── index.html
│ ├── src/
│ │ ├── main.jsx
│ │ ├── App.jsx
│ │ ├── App.css
│ │ ├── components/
│ │ │ ├── Dataset.jsx # Dataset upload & management
│ │ │ ├── Training.jsx # Model training interface
│ │ │ ├── Prediction.jsx # Real-time predictions
│ │ │ ├── Visualization.jsx # Charts & graphs
│ │ │ ├── Report.jsx # Performance reports
│ │ │ └── History.jsx # Training history
│ │ └── utils/
│ │ └── api.js # API communication
│
├── README.md
└── LICENSE (MIT)
Watch EduLens in action:
Click to watch the demo video showing model training, predictions, and visualizations
- Python 3.10+
- Node.js 16+
- Microsoft SQL Server (local or cloud)
1. Clone Repository
git clone https://github.com/mirzaabubakar-mughal/Smart-Academic-Prediction.git
cd Smart-Academic-Prediction2. Backend Setup
cd backend
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
pip install -r requirements.txt3. Generate Dataset
python generate_dataset.py4. Run Backend
python app.py
# Backend runs on http://localhost:80005. Frontend Setup (in new terminal)
cd frontend/edulens
npm install
npm run dev
# Frontend runs on http://localhost:51736. Access Application
Open browser → http://localhost:5173
- Go to Dataset tab
- Click Load Synthetic Data
- Get detailed dataset insights
- Go to Training tab
- Click Start Training Button
- View results with performance metrices
- Go to Prediction tab
- Enter student data (study hours, previous CGPA, etc.)
- Click Predict
- Get predicted grade + confidence score
- Final grade is based on ensemble voting of multiple classifiers
- Go to Analytics tab
- Compare model performance
- View evaluation matrices & ROC curves
- Download report as PDF
- Go to History tab
- Get Training & Prediction History from database
- View model performance comparison
- Go to Report tab
- Press Generate Report Button
- Get report as PDF
1. DATA LOADING
↓
2. DATA PREPROCESSING
• Handle missing values
• Normalize features
• Encode categorical variables
↓
3. CLASS IMBALANCE HANDLING (SMOTE)
• Oversample minority class
• Balanced dataset for training
↓
4. FEATURE REDUCTION (PCA)
• Reduced training time & improved generalization
↓
5. MODEL TRAINING
• 80/20 train-test split
↓
6. MODEL EVALUATION
• Accuracy, Precision, Recall, F1-Score, ROC-AUC
↓
7. PREDICTION & VISUALIZATION
• Generate reports & charts
↓
8. PERSISTENCE
• Store models in SQL Server
• Track training history
Synthetic Dataset: 2,000 imbalanced student samples
Features (8 attributes):
Why Synthetic? Allows controlled testing, no privacy concerns, reproducible results.
Dataset is available on Kaggle CSV
The application includes:
- Confusion Matrix – Model prediction accuracy breakdown
- ROC Curve – Sensitivity vs. specificity analysis
- Model Comparison Chart – Side-by-side performance metrics
- Grade Distribution – Target variable distribution
- Correlation Heatmap – Feature relationships
- PCA Visualization – Reduced feature space visualization
- Integrate Deep Learning Models – LSTM, Neural Networks for sequential patterns
- Validate on Real-World Dataset – Integration with actual educational data
- Add File Upload Feature – Allow users to upload CSV datasets
- Add User Authentication Feature – Multi-user support with login
- Add Early intervention for at-risk students – Get early student results before final exams to provide early support and guide
- Add Automated Model Selection Feature – Auto-choose best model per dataset
Python (Backend)
fastapi==0.104.1
uvicorn==0.24.0
pandas==2.1.3
numpy==1.26.2
scikit-learn==1.3.2
imbalanced-learn==0.11.0 # SMOTE
plotly==5.18.0
sqlalchemy==2.0.23
pyodbc==5.1.0 # SQL Server connector
Node.js (Frontend)
react==18.2.0
vite==5.0.0
plotly.js==2.26.0
axios==1.6.2
This project demonstrates:
- ✅ Complete ML workflow (end-to-end)
- ✅ Handling imbalanced datasets (SMOTE)
- ✅ Feature engineering & dimensionality reduction (PCA)
- ✅ Model comparison & evaluation metrics
- ✅ Full-stack development (Python + React + SQL)
- ✅ Data visualization & reporting
Contributions welcome! Feel free to:
- Report bugs or suggest features (GitHub Issues)
- Fork and submit pull requests
- Share improvements or optimizations
This project is licensed under the MIT License – see LICENSE file for details.
Mirza Abubakar
- 🎓 BS Computer Science, University of Gujrat
- 💼 LinkedIn: linkedin.com/in/mirzaabubakar-852938319
- 📧 Email: abubakar6984456@gmail.com
⭐ If this project helped you, please star it on GitHub!