Skip to content

Priyanshu-Ku/EduPredict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ EduPredict

Student Performance Prediction System

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.

Python FastAPI React Tailwind CSS Docker License

Demo โ€ข Features โ€ข Installation โ€ข API Docs โ€ข Contributing


๐Ÿ“– Project Overview

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.

Why EduPredict?

  • ๐ŸŽฏ 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

โœจ Features

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

๐Ÿ—๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                              EDUPREDICT ARCHITECTURE                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                              โ”‚
โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚    โ”‚              โ”‚         โ”‚              โ”‚         โ”‚              โ”‚       โ”‚
โ”‚    โ”‚    React     โ”‚  HTTP   โ”‚   FastAPI    โ”‚         โ”‚  ML Model    โ”‚       โ”‚
โ”‚    โ”‚   Frontend   โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚   Backend    โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ–บ โ”‚  (sklearn)   โ”‚       โ”‚
โ”‚    โ”‚              โ”‚         โ”‚              โ”‚         โ”‚              โ”‚       โ”‚
โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚
โ”‚           โ”‚                        โ”‚                        โ”‚               โ”‚
โ”‚           โ”‚                        โ”‚                        โ”‚               โ”‚
โ”‚           โ–ผ                        โ–ผ                        โ–ผ               โ”‚
โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚    โ”‚  Dashboard   โ”‚         โ”‚  REST API    โ”‚         โ”‚  Prediction  โ”‚       โ”‚
โ”‚    โ”‚ Visualizationโ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚  /predict    โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚   Results    โ”‚       โ”‚
โ”‚    โ”‚   Charts     โ”‚         โ”‚  /model-info โ”‚         โ”‚              โ”‚       โ”‚
โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ”‚  /health     โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚
โ”‚                             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                โ”‚
โ”‚                                                                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Data Flow

  1. User Input โ†’ Student information entered via React frontend
  2. API Request โ†’ Data sent to FastAPI backend via REST API
  3. Preprocessing โ†’ Features transformed using trained preprocessor
  4. Prediction โ†’ ML model generates score prediction
  5. Response โ†’ Results returned and visualized on dashboard

๐Ÿง  Machine Learning Pipeline

Pipeline Stages

๐Ÿ“ฅ Data Ingestion
      โ”‚
      โ–ผ
๐Ÿ”ง Data Preprocessing
      โ”‚
      โ–ผ
โš™๏ธ Feature Engineering
      โ”‚
      โ–ผ
๐Ÿค– Model Training
      โ”‚
      โ–ผ
๐Ÿ“ Model Evaluation
      โ”‚
      โ–ผ
๐Ÿš€ Model Deployment

Model Details

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)

Input Features

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)

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 18 - UI library
  • Tailwind CSS - Styling
  • Recharts - Data visualization

Backend

  • Python 3.10+ - Programming language
  • FastAPI - Web framework
  • Uvicorn - ASGI server

Machine Learning

  • Scikit-learn - ML algorithms
  • Pandas - Data manipulation
  • NumPy - Numerical computing

DevOps

  • Docker - Containerization
  • GitHub Actions - CI/CD
  • AWS - Cloud deployment

๐Ÿ“ฑ Frontend Pages

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

๐Ÿ”Œ API Endpoints

Base URL: http://localhost:8000

Endpoint Method Description
/predict POST Predict student math score
/model-info GET Get model performance metrics
/health GET Health check endpoint

POST /predict

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
}

GET /model-info

Response:

{
  "model_name": "LinearRegression",
  "r2_score": 0.88,
  "rmse": 5.39
}

GET /health

Response:

{
  "status": "ok",
  "model_loaded": true
}

๐Ÿ“š Interactive API Documentation: http://localhost:8000/docs


๐Ÿ“ Project Structure

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

๐Ÿš€ Installation & Setup

Prerequisites

  • Python 3.10 or higher
  • Node.js 18 or higher
  • npm or yarn
  • Git

1๏ธโƒฃ Clone the Repository

git clone https://github.com/Priyanshu-Ku/mlproject.git
cd mlproject

2๏ธโƒฃ Backend Setup

# 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

3๏ธโƒฃ Frontend Setup

# 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

4๏ธโƒฃ Docker Deployment (Alternative)

# 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

๐Ÿ“ธ Screenshots

๐Ÿ  Home Page

Home Page

๐Ÿ”ฎ Prediction Page

Prediction Page

๐Ÿ“Š Dashboard

Dashboard

โ„น๏ธ Model Info

Model Info

๐Ÿ“š Swagger API Documentation

Swagger API


๐Ÿ”ฎ Future Improvements

  • ๐Ÿ” 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

๐Ÿค Contributing

Contributions are welcome! Here is how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Author

Priyanshu Kumar

GitHub LinkedIn Email


โญ Star this repository if you found it helpful!

Made with โค๏ธ and โ˜• by Priyanshu Kumar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors