Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ML-based-Project-Evaluation-System

=======

Academic Evaluation System with ML-Powered Student Risk Prediction

A comprehensive Django-based academic project evaluation system featuring Machine Learning to predict student risk status with 85%+ accuracy. The system includes real-time dashboards, interactive visualizations, and automated risk assessments to help educators identify and support at-risk students.

πŸš€ Features

Machine Learning Integration

  • Student Risk Prediction: Uses Random Forest, XGBoost, and Neural Networks to classify students as "Safe" or "At Risk"
  • 85%+ Accuracy: Trained models achieve high accuracy in predicting student outcomes
  • Real-Time Predictions: Automatic risk assessment when student data is updated
  • Confidence Scoring: Each prediction includes a confidence score for reliability
  • Prediction Logging: Complete audit trail of all ML predictions

Comprehensive Evaluation System

  • Rubric-Based Evaluation: Customizable evaluation categories and scoring criteria
  • Multiple Evaluation Types: Mid-term, Final, Weekly Progress, Presentations, Demos
  • Performance Tracking: CGPA, Attendance, Assignments, Participation scores
  • Team Management: Support for team-based projects and evaluations

Interactive Dashboards

  • Coordinator Dashboard: System-wide analytics, risk statistics, department analysis
  • Panelist Dashboard: Evaluation management and student assessment tools
  • Team/Student Dashboard: Personal performance metrics and risk status
  • Real-Time Visualizations: Interactive charts using Chart.js

REST API Endpoints

  • /api/predict-risk/ - Predict risk for student data
  • /api/update-risk/<student_id>/ - Update specific student's risk status
  • /api/bulk-update-risks/ - Update all students or filtered subset
  • /api/risk-statistics/ - Get comprehensive risk statistics

πŸ“‹ Requirements

  • Python 3.8+
  • Django 4.2+
  • MySQL 8.0+
  • Modern web browser with JavaScript enabled

πŸ› οΈ Installation & Setup

1. Clone or Download the Project

cd academic_evaluation

2. Create Virtual Environment

# Windows
python -m venv venv
venv\Scripts\activate

# Linux/Mac
python3 -m venv venv
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Configure MySQL Database

Create a MySQL database:

CREATE DATABASE academic_evaluation_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON academic_evaluation_db.* TO 'your_user'@'localhost';
FLUSH PRIVILEGES;

Update academic_evaluation/settings.py:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'academic_evaluation_db',
        'USER': 'your_user',
        'PASSWORD': 'your_password',
        'HOST': 'localhost',
        'PORT': '3306',
    }
}

5. Run Migrations

python manage.py makemigrations
python manage.py migrate

6. Create Superuser

python manage.py createsuperuser

Follow the prompts to create an admin account.

7. Train ML Model

Generate synthetic training data and train the model:

cd evaluation
python train_ml_model.py --generate-data --samples 5000 --output-dir ml_models

This will:

  • Generate 5000 synthetic student records
  • Train Random Forest, XGBoost, and Neural Network models
  • Evaluate and compare model performance
  • Save the best model (85%+ accuracy) to evaluation/ml_models/
  • Generate performance visualizations

Alternative: Use your own data

If you have historical student data in CSV format:

python train_ml_model.py --data path/to/your_data.csv --output-dir ml_models

CSV format required:

student_id,cgpa,attendance_percentage,assignment_completion,participation_score,assignments_late,avg_evaluation_score,semester,absence_count,risk_status
STU001,7.5,85.0,90.0,80.0,1,78.0,5,3,Safe
STU002,4.2,55.0,45.0,40.0,8,48.0,3,18,At Risk

8. Create Logs Directory

mkdir logs

9. Run Development Server

python manage.py runserver

Access the application at http://localhost:8000

πŸ“Š Initial Data Setup

Create Rubric Categories

Login to admin panel at http://localhost:8000/admin and create rubric categories:

  1. Technical Skills (100 points, weight: 1.5)
  2. Communication (100 points, weight: 1.0)
  3. Teamwork (100 points, weight: 1.0)
  4. Documentation (100 points, weight: 1.2)
  5. Innovation (100 points, weight: 1.3)

Add Sample Projects

Create sample projects through admin:

  • Project ID: PROJ001
  • Title: E-Commerce Platform
  • Department: Computer Science
  • Semester: 5

Add Students

Use the Student form (/students/create/) or admin panel to add students. The system will automatically:

  1. Calculate risk prediction using ML model
  2. Store prediction with confidence score
  3. Log the prediction for audit trail

🎯 Usage Guide

For Coordinators

  1. View Dashboard: Navigate to Coordinator Dashboard
  2. Monitor At-Risk Students: Check "Critical: Students Needing Attention" section
  3. Department Analysis: Review department-wise statistics
  4. Bulk Updates: Click "Update All Predictions" to refresh all risk statuses
  5. Export Data: Use admin panel for data export

For Panelists/Evaluators

  1. Create Evaluations: Use "New Evaluation" button
  2. Fill Rubric Scores: Enter scores based on rubric categories
  3. Automatic Updates: Student risk status updates after each evaluation
  4. View History: Check recent evaluations in your dashboard

For Students

  1. View Performance: Access Team Dashboard
  2. Check Risk Status: See your current risk prediction with confidence
  3. Track Progress: Monitor CGPA, attendance, assignments
  4. Review Feedback: Read evaluation comments and suggestions

πŸ”Œ API Usage Examples

Predict Risk for New Data

curl -X POST http://localhost:8000/api/predict-risk/ \
  -H "Content-Type: application/json" \
  -d '{
    "cgpa": 7.5,
    "attendance_percentage": 85.0,
    "assignment_completion": 90.0,
    "participation_score": 80.0,
    "assignments_late": 1,
    "avg_evaluation_score": 78.0,
    "semester": 5,
    "absence_count": 3
  }'

Response:

{
  "prediction": "Safe",
  "confidence": 0.92,
  "details": {
    "probability_safe": 0.92,
    "probability_at_risk": 0.08,
    "risk_score": 8.0
  },
  "status": "success"
}

Update Student Risk Status

curl -X POST http://localhost:8000/api/update-risk/STU001/ \
  -H "X-CSRFToken: <your-csrf-token>"

Get Risk Statistics

curl http://localhost:8000/api/risk-statistics/

πŸ§ͺ ML Model Details

Features Used

  1. CGPA (0-10 scale)
  2. Attendance Percentage (0-100%)
  3. Assignment Completion (0-100%)
  4. Participation Score (0-100)
  5. Late Assignments Count
  6. Average Evaluation Score (0-100)
  7. Semester (1-8)
  8. Absence Count

Models Trained

  1. Random Forest - Ensemble learning with decision trees
  2. XGBoost - Gradient boosting for high performance
  3. Neural Network (MLP) - Deep learning approach

Model Performance

  • Accuracy: 85%+ on test data
  • Precision: High precision for "At Risk" detection
  • Recall: Balanced recall to minimize false negatives
  • F1-Score: Optimized for both classes

Model Files

  • evaluation/ml_models/student_risk_model.pkl - Trained model
  • evaluation/ml_models/feature_scaler.pkl - Feature scaler
  • evaluation/ml_models/label_encoder.pkl - Label encoder
  • evaluation/ml_models/model_metadata.json - Model information

πŸ“ Project Structure

academic_evaluation/
β”œβ”€β”€ academic_evaluation/          # Django project settings
β”‚   β”œβ”€β”€ settings.py              # Configuration
β”‚   β”œβ”€β”€ urls.py                  # Root URL configuration
β”‚   └── wsgi.py                  # WSGI application
β”œβ”€β”€ evaluation/                   # Main application
β”‚   β”œβ”€β”€ models.py                # Database models
β”‚   β”œβ”€β”€ views.py                 # View controllers with ML integration
β”‚   β”œβ”€β”€ forms.py                 # Django forms
β”‚   β”œβ”€β”€ urls.py                  # App URL patterns
β”‚   β”œβ”€β”€ api_urls.py              # API endpoints
β”‚   β”œβ”€β”€ admin.py                 # Admin interface
β”‚   β”œβ”€β”€ ml_service.py            # ML prediction service
β”‚   β”œβ”€β”€ train_ml_model.py        # ML training script
β”‚   β”œβ”€β”€ ml_models/               # Trained ML models
β”‚   └── templates/               # HTML templates
β”‚       └── evaluation/
β”‚           β”œβ”€β”€ coordinator_dashboard.html
β”‚           β”œβ”€β”€ panelist_dashboard.html
β”‚           β”œβ”€β”€ team_dashboard.html
β”‚           β”œβ”€β”€ student_list.html
β”‚           β”œβ”€β”€ student_detail.html
β”‚           └── ...
β”œβ”€β”€ manage.py                    # Django management script
β”œβ”€β”€ requirements.txt             # Python dependencies
└── README.md                    # This file

πŸ”’ Security Considerations

Before deploying to production:

  1. Change SECRET_KEY in settings.py
  2. Set DEBUG = False
  3. Configure proper ALLOWED_HOSTS
  4. Use environment variables for sensitive data
  5. Enable HTTPS
  6. Configure CSRF and CORS properly
  7. Set up proper authentication
  8. Regular backup of database
  9. Monitor prediction logs for anomalies

πŸ› Troubleshooting

ML Model Not Loading

Problem: "Model file not found" error

Solution:

cd evaluation
python train_ml_model.py --generate-data --samples 5000

Database Connection Error

Problem: "Can't connect to MySQL server"

Solution:

  • Verify MySQL is running
  • Check credentials in settings.py
  • Ensure database exists
  • Check firewall settings

Import Errors

Problem: "ModuleNotFoundError"

Solution:

pip install -r requirements.txt --upgrade

Low Model Accuracy

Problem: Model accuracy < 85%

Solution:

  • Generate more training samples (--samples 10000)
  • Use real historical data if available
  • Tune hyperparameters in train_ml_model.py
  • Check data quality and balance

πŸ“ˆ Future Enhancements

  • Additional ML models (SVM, Gradient Boosting)
  • Time-series analysis for trend prediction
  • Email notifications for at-risk students
  • Advanced analytics with Plotly
  • Mobile application
  • Export reports to PDF
  • Integration with LMS platforms
  • Multi-language support

πŸ‘₯ Contributing

This is an academic project. Contributions for educational purposes are welcome!

πŸ“„ License

This project is created for academic purposes.

πŸ“ž Support

For issues and questions:

  1. Check the troubleshooting section
  2. Review Django and ML library documentation
  3. Check prediction logs in logs/django.log
  4. Verify model metadata in ml_models/model_metadata.json

πŸŽ“ Academic Use

This system demonstrates:

  • Machine Learning integration in web applications
  • Django ORM and database design
  • REST API development
  • Real-time data visualization
  • Production-ready code structure

Perfect for:

  • Final year projects
  • ML/AI coursework
  • Web development portfolios
  • Research on student performance prediction

Built with Django + Machine Learning

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages