ExamPredict – Intelligent Student Performance Prediction and Early Warning System
ExamPredict is an intelligent web-based academic analytics system designed to predict student examination performance and identify students who may require academic support. The system uses two well-known machine learning approaches: Linear Regression as a baseline prediction model and Random Forest Regression to capture more complex relationships among academic and lifestyle factors. It allows instructors to compare the predictions of both models and examine the factors associated with lower or higher predicted scores. The project uses the publicly available Student Habits and Academic Performance Dataset, described as containing approximately 80,000 synthetic student records. The data includes study hours, attendance, previous GPA, sleep habits, motivation, time management and other contextual attributes, together with exam scores. Students will clean and prepare the dataset, develop and evaluate both prediction models, and integrate the selected models into a Flask web application. The system will display predicted exam scores, instructor-defined academic risk categories, comparison reports and practical study-support suggestions. The predictions are educational estimates, not verified outcomes for real students.
Functional Requirements: The functional requirements of this project are given below:
Requirement: Design a complete multi-page web application for academic performance prediction and analysis.
1. Responsive & Professional Web Interface Design
Details:
• Home Page: Display the project overview, objectives and access to prediction features.
• Prediction Page: Provide fields for study hours, attendance, previous GPA, sleep hours, motivation, time management and other selected inputs.
• Allow users to choose Linear Regression or Random Forest Regression for prediction.
• Display predicted exam score, academic risk level and short improvement suggestions.
• Dataset Page: Show dataset summary, attributes and a preview of student records.
• Dashboard: Present prediction history, feature charts and side-by-side model comparisons.
• About Page: Explain the dataset, model techniques and limitations of predictions.
2. Flask Backend API with Prediction Logic
Requirement: Implement a REST API that connects the web application with the trained prediction models. Details:
• POST /api/predict: Accept student input values, validate them and return predicted exam score and selected model name.
• POST /api/compare: Run both models for the same input and return a side-by-side prediction comparison.
• GET /api/history: Retrieve previously saved predictions from the database.
• GET /api/metrics: Return stored evaluation metrics of both machine learning models.
• Apply the same fitted preprocessing steps used during training to each new prediction.
• Handle missing or invalid input values and return understandable error messages.
3. Data Collection Requirement: Load the given Student Habits and Academic Performance Dataset for academic score prediction.
Details:
• Use the dataset available at: https://www.kaggle.com/datasets/aryan208/student-habitsand-academic-performance-dataset/data Or given with this file named “enhanced_student_habits_performance_dataset”.
• Use the supplied synthetic dataset described as containing approximately 80,000 student records.
• Identify useful attributes, including study_hours_per_day, attendance_percentage, previous_gpa, sleep_hours, motivation_level and time_management_score.
• Use exam_score as the main prediction target and verify the available columns and data types before processing.
4. Data Preparation Requirement: Clean and standardize the selected dataset before model development. Details:
• Identify missing values, duplicate records, invalid entries and inconsistent data types.
• Check realistic ranges for numeric attributes such as attendance percentage and study hours.
• Remove student_id from predictive inputs; keep exam_score exclusively as the target variable.
• Exclude dropout_risk from exam score prediction, since it is a derived label and not a measured dropout outcome.
• Save the cleaned data in CSV format and document the changes made.
5. Data Pre-Processing Requirement: Convert raw student attributes into machine learning-ready input features.
Details:
• Handle missing numeric values using a documented imputation method.
• Encode selected categorical values (e.g., major, part_time_job and study_environment) using One-Hot Encoding.
• Scale numeric features where appropriate, especially for Linear Regression.
• Separate the target exam_score from the input features and prevent target leakage.
• Create reusable scikit-learn preprocessing pipelines for both training and new predictions.
6. Exploratory Data Analysis and Feature Selection Requirement: Explore student habits and identify relevant inputs for performance prediction.
Details:
• Create summary statistics and charts for exam scores, study hours, attendance and previous GPA.
• Explore associations between exam_score and selected academic or lifestyle attributes.
• Use correlation analysis and feature-importance results to study useful predictors.
• Identify redundant or potentially misleading features and record the final selected inputs.
• Treat sensitive personal attributes as optional analysis fields rather than mandatory inputs for student risk decisions.
7. Train, Validation and Test Data Preparation: Prepare reproducible datasets for training, tuning and final evaluation.
Details:
• Split the cleaned dataset into 70% training, 15% validation and 15% testing records.
• Apply data cleaning transformations using the training split only, then reuse them on validation and test data.
• Use a fixed random state to make model comparisons reproducible.
• Use validation data for model selection and parameter tuning; reserve test data for the final unbiased comparison.
8. Model Development – Linear Regression Requirement: Build a standard regression model to predict student exam scores.
Details:
• Train a Linear Regression model from scikit-learn using the selected input features.
• Use the model to estimate exam_score for individual students.
• Analyze model coefficients to understand the direction of relationships where meaningful.
• Save the trained model and fitted preprocessing pipeline for use in the Flask application.
9. Model Development – Random Forest Regression Requirement: Build an ensemble regression model to improve prediction of exam scores.
Details:
• Train a Random Forest Regressor using scikit-learn on the same training data.
• Tune understandable parameters such as n_estimators and max_depth using validation data.
• Generate exam score predictions and obtain feature-importance rankings.
• Save the trained model and compare its results with the Linear Regression model.
10. Early Warning System and Performance Evaluation Requirement: Generate academic risk alerts and evaluate the reliability of both prediction models.
Details:
• Assign configurable academic risk levels (High, Moderate and Low) from predicted exam scores using instructor-defined thresholds.
• Provide simple, rule-based study-support suggestions based on inputs such as low attendance or limited study time.
• Compare model predictions with actual exam_score values on the reserved test dataset.
• Calculate Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and R² Score for both models.
• Display Actual vs Predicted charts and model comparison results on the dashboard.
• Discuss model limitations, including that the dataset is synthetic and academic risk is not verified dropout risk.
-
Tools & Technologies
- Backend: Python 3.10+, Flask, SQLite
- Machine Learning: Scikit-learn (Linear Regression, Random Forest Regressor), Joblib
- Data Processing & Analysis: Pandas, NumPy, Matplotlib
- Frontend: HTML5, Bootstrap 5, JavaScript (Fetch API), Chart.js
- Development: PyCharm or VS Code, Python virtual environment, Git for version control
Faisal Mehmood
Faisal Mehmood Expert in CS619 Final Year Projects and software development.
View all projects