Skip to content

rehanxt5/ai-powered-student-insights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ai-powered-student-insights

๐ŸŽ“ IntelliDash - AI-Powered Student Insights

Status Python Flask License

Track. Analyze. Improve.

An intelligent dashboard that transforms student data into actionable insights through AI-powered analytics and predictive modeling.

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


๐Ÿ“‹ Table of Contents


๐ŸŒŸ Overview

IntelliDash is a comprehensive educational analytics platform that helps educators and institutions:

  • ๐Ÿ“Š Visualize student performance trends and patterns
  • ๐ŸŽฏ Predict academic outcomes using machine learning
  • ๐Ÿ” Identify at-risk students early
  • ๐Ÿ“ˆ Track learning metrics and engagement
  • ๐Ÿ’ก Make data-informed educational decisions

The platform combines interactive data visualizations with two AI models: a Random Forest Classifier for dropout prediction and a Linear Regression Model for performance forecasting.


โœจ Features

๐Ÿ“Š Interactive Dashboard

  • Real-time Data Visualization - Dynamic charts using Chart.js
  • Student Performance Table - Paginated, searchable data grid
  • Individual Student Profiles - Detailed modal views with quiz breakdowns
  • Responsive Design - Works seamlessly on desktop, tablet, and mobile

๐Ÿค– AI-Powered Predictions

1. Performance Prediction (Linear Regression)

Predicts academic performance based on:

  • ๐Ÿ“š Hours Studied
  • ๐Ÿ“Š Previous Scores
  • โšฝ Extracurricular Activities
  • ๐Ÿ˜ด Sleep Hours
  • ๐Ÿ“ Papers Practiced

2. Dropout Risk Analysis (Random Forest)

Identifies at-risk students using:

  • Age & GPA
  • Attendance Rate
  • Assignment Submission Rate
  • Quiz Completion Rate
  • Learning Platform Engagement
  • Login Frequency

๐Ÿ“ˆ Visualizations

  • Donut Charts - Average class scores across subjects
  • Bar Charts - Grade distribution histograms
  • Student-specific Charts - Individual quiz performance
  • Color-coded Insights - Performance level indicators

๐ŸŽจ Modern UI/UX

  • Glassmorphism design with gradient accents
  • Smooth animations and transitions
  • Blue/purple theme with high contrast
  • Accessible and intuitive interface

๐Ÿ›  Tech Stack

Frontend

  • HTML5 - Semantic markup
  • CSS3 - Modern styling with gradients, glassmorphism
  • JavaScript (ES6+) - Dynamic interactions
  • Chart.js - Data visualizations

Backend

  • Python 3.9+ - Core language
  • Flask - Web framework
  • Flask-CORS - Cross-origin resource sharing

Machine Learning

  • NumPy - Numerical computations
  • Scikit-learn - ML models (Random Forest, Linear Regression)
  • Pickle - Model serialization

Data

  • CSV - Student performance datasets
  • Pandas - Data processing (training phase)

๐Ÿ“ Project Structure

ai-powered-student-insights/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ Student_Performance.csv           # Raw performance data (10,000+ records)
โ”‚   โ”‚   โ”œโ”€โ”€ cleaned_student_data.csv          # Processed student data
โ”‚   โ”‚   โ””โ”€โ”€ student_data_with_quiz_scores.csv # Quiz-enriched dataset
โ”‚   โ”œโ”€โ”€ main.py                                # Dropout prediction API (Port 5000)
โ”‚   โ”œโ”€โ”€ regression-main.py                     # Performance prediction API (Port 5001)
โ”‚   โ”œโ”€โ”€ regression-training-script.ipynb       # Model training notebook
โ”‚   โ”œโ”€โ”€ regression_model.pkl                   # Trained regression model
โ”‚   โ””โ”€โ”€ student_dropout_random_forest.pkl      # Trained classifier model
โ”œโ”€โ”€ index.html                                 # Main dashboard page
โ”œโ”€โ”€ styles.css                                 # Styling and themes
โ”œโ”€โ”€ visualization.js                           # Frontend logic and API calls
โ”œโ”€โ”€ PREDICTION_INTEGRATION.md                  # Integration documentation
โ””โ”€โ”€ README.md                                  # This file

๐Ÿš€ Installation

Prerequisites

  • Python 3.9 or higher
  • pip package manager
  • Modern web browser (Chrome, Firefox, Safari, Edge)

Step 1: Clone the Repository

git clone https://github.com/rehanxt5/ai-powered-student-insights.git
cd ai-powered-student-insights

Step 2: Create Virtual Environment

python3 -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

Step 3: Install Dependencies

pip install flask flask-cors numpy scikit-learn pandas

Step 4: Verify Model Files

Ensure the following model files exist:

ls backend/regression_model.pkl
ls backend/student_dropout_random_forest.pkl

๐Ÿ’ป Usage

Starting the Backend Servers

1. Performance Prediction Server (Port 5001)

python backend/regression-main.py

Server will run on: http://localhost:5001

2. Dropout Prediction Server (Port 5000)

python backend/main.py

Server will run on: http://localhost:5000

Opening the Frontend

Option 1: Direct File Open

open index.html

Option 2: Local HTTP Server (Recommended)

python3 -m http.server 8000
# Navigate to http://localhost:8000

๐Ÿ”Œ API Documentation

Performance Prediction API

Endpoint: POST http://localhost:5001/predict

Request Body:

{
  "features": [
    7,    // Hours Studied (0-24)
    85,   // Previous Scores (0-100)
    1,    // Extracurricular Activities (0=No, 1=Yes)
    8,    // Sleep Hours (0-24)
    5     // Papers Practiced (0-100+)
  ]
}

Response:

{
  "predicted_performance": 77.88857895121386
}

Health Check:

GET http://localhost:5001/health

Dropout Prediction API

Endpoint: POST http://localhost:5000/predict

Request Body:

{
  "age": 18,
  "gpa": 3.5,
  "gender_encoded": 1,
  "attendance_rate": 85.5,
  "assignment_submission_rate": 90.0,
  "quiz_completion_rate": 88.0,
  "time_spent_on_learning_platform": 120.5,
  "login_frequency": 15
}

Response:

{
  "prediction": 0,  // 0 = No dropout risk, 1 = At risk
  "features": { /* echo of input */ }
}

Health Check:

GET http://localhost:5000/health

๐Ÿค– Machine Learning Models

1. Linear Regression - Performance Predictor

Purpose: Predict student performance index (0-100)

Features (5):

  1. Hours Studied
  2. Previous Exam Scores
  3. Extracurricular Participation
  4. Sleep Hours
  5. Practice Papers Completed

Training Data: Student_Performance.csv (10,000+ records)

Normalization: Z-score standardization

Model File: regression_model.pkl


2. Random Forest Classifier - Dropout Prediction

Purpose: Identify students at risk of dropping out

Features (8):

  1. Age
  2. GPA
  3. Gender (encoded)
  4. Attendance Rate
  5. Assignment Submission Rate
  6. Quiz Completion Rate
  7. Time on Learning Platform
  8. Login Frequency

Training Data: cleaned_student_data.csv

Model File: student_dropout_random_forest.pkl


๐ŸŽจ Screenshots

Dashboard Overview

  • Clean, modern interface with gradient design
  • Real-time data loading and visualization
  • Interactive charts and tables

Performance Predictor

  • User-friendly form with validation
  • Instant AI predictions
  • Color-coded results:
    • ๐ŸŒŸ 90-100: Excellent (Green)
    • โœ… 75-89: Good (Blue)
    • โš ๏ธ 60-74: Moderate (Orange)
    • ๐Ÿ”ด <60: Needs Support (Red)

Student Details Modal

  • Individual quiz scores breakdown
  • Performance metrics
  • Visual progress indicators

๐Ÿงช Testing the APIs

Test Performance Prediction

curl -X POST http://localhost:5001/predict \
  -H "Content-Type: application/json" \
  -d '{"features": [7, 85, 1, 8, 5]}'

Expected Output:

{"predicted_performance": 77.88857895121386}

Test Dropout Prediction

curl -X POST http://localhost:5000/predict \
  -H "Content-Type: application/json" \
  -d '{
    "age": 18,
    "gpa": 3.5,
    "gender_encoded": 1,
    "attendance_rate": 85.5,
    "assignment_submission_rate": 90.0,
    "quiz_completion_rate": 88.0,
    "time_spent_on_learning_platform": 120.5,
    "login_frequency": 15
  }'

๐Ÿ› Troubleshooting

Issue: Port Already in Use

# Kill process on port 5001
lsof -ti:5001 | xargs kill -9

# Kill process on port 5000
lsof -ti:5000 | xargs kill -9

Issue: CORS Errors

  • Ensure flask-cors is installed
  • Verify CORS(app) is called in Flask apps

Issue: Model Not Found

# Check model files exist
ls -la backend/*.pkl

Issue: Module Not Found

# Reinstall dependencies
pip install flask flask-cors numpy scikit-learn pandas

๐ŸŽฏ Use Cases

For Educators

  • ๐Ÿ“Š Monitor class performance trends
  • ๐Ÿ” Identify struggling students early
  • ๐Ÿ“ˆ Track engagement metrics
  • ๐Ÿ’ก Make informed intervention decisions

For Administrators

  • ๐Ÿ“‰ Reduce dropout rates
  • ๐Ÿ“Š Analyze program effectiveness
  • ๐ŸŽฏ Allocate resources efficiently
  • ๐Ÿ“ˆ Improve student outcomes

For Researchers

  • ๐Ÿ”ฌ Study learning patterns
  • ๐Ÿ“Š Validate educational interventions
  • ๐Ÿค– Experiment with ML models
  • ๐Ÿ“ˆ Publish data-driven insights

๐Ÿ”ฎ Future Enhancements

  • User authentication and role-based access
  • Real-time data updates with WebSockets
  • Export reports as PDF/Excel
  • Email alerts for at-risk students
  • Mobile app (React Native)
  • Integration with LMS platforms
  • Advanced ML models (Deep Learning, XGBoost)
  • A/B testing framework
  • Multi-language support
  • Dark mode theme

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/AmazingFeature
  3. Commit your changes
    git commit -m 'Add some 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

Rehan


๐Ÿ™ Acknowledgments

  • Chart.js - Beautiful, responsive charts
  • Flask - Lightweight web framework
  • Scikit-learn - Machine learning toolkit
  • Educational Data Community - Inspiration and datasets

๐Ÿ“ž Support

For questions or issues:


โญ Star this repo if you find it helpful!

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors