An end-to-end Machine Learning project that predicts student math performance based on demographic and academic features, deployed with FastAPI and visualized through a React dashboard.
Demo โข Features โข Installation โข API Docs โข Contributing
EduPredict is a comprehensive machine learning solution designed to predict student academic performance in mathematics based on various demographic and academic factors. The system helps educators and institutions identify students who may need additional support, enabling early intervention strategies.
- ๐ฏ Early Intervention: Identify at-risk students before they fall behind
- ๐ Data-Driven Decisions: Make informed decisions based on predictive analytics
- ๐ Real-Time Predictions: Get instant predictions through the web interface
- ๐ Performance Monitoring: Track model accuracy and reliability metrics
| Feature | Description |
|---|---|
| ๐ฎ Real-Time Prediction | Instant student score predictions through an intuitive web interface |
| ๐ Analytics Dashboard | Comprehensive visualization of model performance and prediction statistics |
| ๐ FastAPI Backend | High-performance REST API with automatic documentation |
| ๐จ Modern UI | Beautiful React + Tailwind CSS frontend with responsive design |
| ๐ Interactive Charts | Dynamic visualizations using Recharts library |
| ๐ Health Monitoring | Built-in health check endpoint for system monitoring |
| ๐ณ Docker Ready | Containerized deployment for consistent environments |
| ๐ CI/CD Pipeline | Automated testing and deployment with GitHub Actions |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ EDUPREDICT ARCHITECTURE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ โ โ โ โ โ
โ โ React โ HTTP โ FastAPI โ โ ML Model โ โ
โ โ Frontend โ โโโโโโโบ โ Backend โ โโโโโโโบ โ (sklearn) โ โ
โ โ โ โ โ โ โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ Dashboard โ โ REST API โ โ Prediction โ โ
โ โ Visualizationโโโโโโโโโโโ /predict โโโโโโโโโโโ Results โ โ
โ โ Charts โ โ /model-info โ โ โ โ
โ โโโโโโโโโโโโโโโโ โ /health โ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- User Input โ Student information entered via React frontend
- API Request โ Data sent to FastAPI backend via REST API
- Preprocessing โ Features transformed using trained preprocessor
- Prediction โ ML model generates score prediction
- Response โ Results returned and visualized on dashboard
๐ฅ Data Ingestion
โ
โผ
๐ง Data Preprocessing
โ
โผ
โ๏ธ Feature Engineering
โ
โผ
๐ค Model Training
โ
โผ
๐ Model Evaluation
โ
โผ
๐ Model Deployment
| Aspect | Details |
|---|---|
| Algorithm | Linear Regression |
| Features | 7 input features |
| Target | Math Score (0-100) |
| Metrics | Rยฒ Score, RMSE |
| Preprocessing | StandardScaler, OneHotEncoder |
| Validation | Train-Test Split (80-20) |
| Feature | Type | Description |
|---|---|---|
gender |
Categorical | Student gender (male/female) |
race_ethnicity |
Categorical | Ethnic group (A, B, C, D, E) |
parental_level_of_education |
Categorical | Parent highest education level |
lunch |
Categorical | Lunch type (standard/free-reduced) |
test_preparation_course |
Categorical | Course completion status |
reading_score |
Numeric | Reading test score (0-100) |
writing_score |
Numeric | Writing test score (0-100) |
- React 18 - UI library
- Tailwind CSS - Styling
- Recharts - Data visualization
- Python 3.10+ - Programming language
- FastAPI - Web framework
- Uvicorn - ASGI server
- Scikit-learn - ML algorithms
- Pandas - Data manipulation
- NumPy - Numerical computing
- Docker - Containerization
- GitHub Actions - CI/CD
- AWS - Cloud deployment
| Page | Description | Key Features |
|---|---|---|
| ๐ Home | Landing page with project overview | Hero section, feature highlights |
| ๐ฎ Predict | Student score prediction form | Input validation, instant results |
| ๐ Dashboard | Analytics and visualizations | Charts, statistics, recent predictions |
| โน๏ธ Model Info | ML model details and metrics | Rยฒ Score, RMSE, model explanation |
| ๐ค About | Project and developer information | Tech stack, contact links |
| Endpoint | Method | Description |
|---|---|---|
/predict |
POST | Predict student math score |
/model-info |
GET | Get model performance metrics |
/health |
GET | Health check endpoint |
Request:
{
"gender": "female",
"race_ethnicity": "group B",
"parental_level_of_education": "bachelor's degree",
"lunch": "standard",
"test_preparation_course": "completed",
"reading_score": 72,
"writing_score": 74
}Response:
{
"predicted_math_score": 62.8
}Response:
{
"model_name": "LinearRegression",
"r2_score": 0.88,
"rmse": 5.39
}Response:
{
"status": "ok",
"model_loaded": true
}๐ Interactive API Documentation: http://localhost:8000/docs
EduPredict/
โ
โโโ ๐ backend/
โ โโโ ๐ app/
โ โ โโโ ๐ api/ # API route handlers
โ โ โโโ ๐ core/ # Configuration settings
โ โ โโโ ๐ models/ # ML model loader
โ โ โโโ ๐ schemas/ # Pydantic data models
โ โ โโโ ๐ services/ # Business logic
โ โ โโโ ๐ main.py # FastAPI application entry
โ โ
โ โโโ ๐ ml_pipeline/
โ โ โโโ ๐ components/ # Data ingestion, transformation, training
โ โ โโโ ๐ pipeline/ # Prediction & training pipelines
โ โ โโโ ๐ utils/ # Logging, exceptions, utilities
โ โ
โ โโโ ๐ artifacts/ # Trained model & preprocessor
โ โโโ ๐ requirements.txt # Python dependencies
โ
โโโ ๐ frontend/
โ โโโ ๐ public/ # Static assets
โ โโโ ๐ src/
โ โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ pages/ # Page components
โ โ โโโ ๐ context/ # State management
โ โโโ ๐ package.json # Node.js dependencies
โ
โโโ ๐ notebooks/ # Jupyter notebooks for EDA
โโโ ๐ docker/
โ โโโ ๐ Dockerfile
โ โโโ ๐ docker-compose.yml
โ
โโโ ๐ screenshots/ # Application screenshots
โโโ ๐ .github/workflows/ # CI/CD pipeline
โโโ ๐ README.md
- Python 3.10 or higher
- Node.js 18 or higher
- npm or yarn
- Git
git clone https://github.com/Priyanshu-Ku/mlproject.git
cd mlproject# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows (PowerShell)
.\venv\Scripts\Activate.ps1
# Windows (CMD)
.\venv\Scripts\activate.bat
# Linux/macOS
source venv/bin/activate
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Start the FastAPI server
uvicorn app.main:app --reload --port 8000โ Backend running at: http://localhost:8000
# Open new terminal and navigate to frontend
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# OR
npm startโ Frontend running at: http://localhost:3000
# Using Docker Compose
cd docker
docker-compose up --build
# Or build manually
docker build -f docker/Dockerfile -t edupredict:latest .
docker run -d -p 8000:8000 --name edupredict edupredict:latest- ๐ User Authentication โ Secure login and user management
- ๐พ Prediction History โ Store predictions in database for tracking
- ๐ค Batch Prediction โ Upload CSV files for bulk predictions
- ๐ Model Retraining โ Automated pipeline for model updates
- โ๏ธ Cloud Deployment โ Deploy to AWS/Azure/GCP
- ๐ฑ Mobile App โ React Native companion app
- ๐ Multi-language Support โ Internationalization (i18n)
- ๐ง Email Notifications โ Alert system for at-risk students
Contributions are welcome! Here is how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
โญ Star this repository if you found it helpful!
Made with โค๏ธ and โ by Priyanshu Kumar




