=======
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.
- 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
- 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
- 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
/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
- Python 3.8+
- Django 4.2+
- MySQL 8.0+
- Modern web browser with JavaScript enabled
cd academic_evaluation# Windows
python -m venv venv
venv\Scripts\activate
# Linux/Mac
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate 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',
}
}python manage.py makemigrations
python manage.py migratepython manage.py createsuperuserFollow the prompts to create an admin account.
Generate synthetic training data and train the model:
cd evaluation
python train_ml_model.py --generate-data --samples 5000 --output-dir ml_modelsThis 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_modelsCSV 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
mkdir logspython manage.py runserverAccess the application at http://localhost:8000
Login to admin panel at http://localhost:8000/admin and create rubric categories:
- Technical Skills (100 points, weight: 1.5)
- Communication (100 points, weight: 1.0)
- Teamwork (100 points, weight: 1.0)
- Documentation (100 points, weight: 1.2)
- Innovation (100 points, weight: 1.3)
Create sample projects through admin:
- Project ID: PROJ001
- Title: E-Commerce Platform
- Department: Computer Science
- Semester: 5
Use the Student form (/students/create/) or admin panel to add students. The system will automatically:
- Calculate risk prediction using ML model
- Store prediction with confidence score
- Log the prediction for audit trail
- View Dashboard: Navigate to Coordinator Dashboard
- Monitor At-Risk Students: Check "Critical: Students Needing Attention" section
- Department Analysis: Review department-wise statistics
- Bulk Updates: Click "Update All Predictions" to refresh all risk statuses
- Export Data: Use admin panel for data export
- Create Evaluations: Use "New Evaluation" button
- Fill Rubric Scores: Enter scores based on rubric categories
- Automatic Updates: Student risk status updates after each evaluation
- View History: Check recent evaluations in your dashboard
- View Performance: Access Team Dashboard
- Check Risk Status: See your current risk prediction with confidence
- Track Progress: Monitor CGPA, attendance, assignments
- Review Feedback: Read evaluation comments and suggestions
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"
}curl -X POST http://localhost:8000/api/update-risk/STU001/ \
-H "X-CSRFToken: <your-csrf-token>"curl http://localhost:8000/api/risk-statistics/- CGPA (0-10 scale)
- Attendance Percentage (0-100%)
- Assignment Completion (0-100%)
- Participation Score (0-100)
- Late Assignments Count
- Average Evaluation Score (0-100)
- Semester (1-8)
- Absence Count
- Random Forest - Ensemble learning with decision trees
- XGBoost - Gradient boosting for high performance
- Neural Network (MLP) - Deep learning approach
- 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
evaluation/ml_models/student_risk_model.pkl- Trained modelevaluation/ml_models/feature_scaler.pkl- Feature scalerevaluation/ml_models/label_encoder.pkl- Label encoderevaluation/ml_models/model_metadata.json- Model information
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
Before deploying to production:
- Change
SECRET_KEYin settings.py - Set
DEBUG = False - Configure proper
ALLOWED_HOSTS - Use environment variables for sensitive data
- Enable HTTPS
- Configure CSRF and CORS properly
- Set up proper authentication
- Regular backup of database
- Monitor prediction logs for anomalies
Problem: "Model file not found" error
Solution:
cd evaluation
python train_ml_model.py --generate-data --samples 5000Problem: "Can't connect to MySQL server"
Solution:
- Verify MySQL is running
- Check credentials in settings.py
- Ensure database exists
- Check firewall settings
Problem: "ModuleNotFoundError"
Solution:
pip install -r requirements.txt --upgradeProblem: 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
- 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
This is an academic project. Contributions for educational purposes are welcome!
This project is created for academic purposes.
For issues and questions:
- Check the troubleshooting section
- Review Django and ML library documentation
- Check prediction logs in
logs/django.log - Verify model metadata in
ml_models/model_metadata.json
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