An End-to-End Flask-based Web Application to Analyze and Predict Student Exam Performance.
- Project Overview
- Features
- Tech Stack
- Data Pipeline
- Model Evaluation
- Setup Instructions
- Usage
- Future Enhancements
- Contributing
- License
The Student Exam Performance Indicator is a web application designed to assist teachers and educational institutions in analyzing student exam performance and gaining insights to improve educational outcomes. By leveraging machine learning, this tool predicts a student's performance and suggests personalized educational strategies for improvement.
The key objectives of this project are:
- To visualize trends in student performance using interactive charts.
- To predict exam results using machine learning models with an R² score of 0.879.
- To help teachers tailor their teaching strategies based on predicted outcomes.
- Data Visualization: Provides insightful visualizations of student performance data (e.g., distribution of scores, correlation between variables, etc.).
- Prediction Engine: Predicts student exam scores based on multiple attributes like gender, parental level of education, and previous scores.
- Interactive Dashboard: User-friendly interface where teachers can explore and analyze the predictions.
- Customizable Reports: Generates reports for each student, highlighting areas of improvement and strengths.
- Backend: Flask (Python)
- Frontend: HTML, CSS, Bootstrap
- Database: SQLite (can be replaced with any relational database)
- Machine Learning: Scikit-learn, Pandas, NumPy, Matplotlib, Seaborn
- Deployment: Docker (optional), Gunicorn (optional)
-
Data Ingestion: Loading the student performance data from a CSV file.
-
Exploratory Data Analysis (EDA):
- Visualizations of student performance using tools like Matplotlib and Seaborn.
- Key insights include score distribution, feature relationships, and performance trends.
-
Data Preprocessing:
- Handling missing data, categorical encoding (one-hot encoding), and normalization.
- Splitting the data into training and testing sets.
-
Model Training:
- Multiple models were trained, including Linear Regression, Random Forest, and XGBoost.
- Hyperparameter tuning using GridSearchCV was performed to optimize performance.
-
Model Evaluation:
- The selected model achieved an R² score of 0.879, making it ideal for predicting student exam scores.
- Metrics used: Mean Squared Error (MSE), R² Score, and Root Mean Squared Error (RMSE).
After experimenting with various models, Random Forest emerged as the best-performing model for this problem. It was evaluated on the test set, and the following metrics were achieved:
- R² Score: 0.879
- Mean Squared Error (MSE):
- Root Mean Squared Error (RMSE):
The model was selected for its ability to generalize well on unseen data and its interpretability in a classroom setting.
- Python 3.10+
- Flask
- Scikit-learn
- Pandas, NumPy, Matplotlib, Seaborn
-
Clone the repository: git clone https://github.com/SamJoeSilvano/mlproject.git
-
Navigate to the project directory: cd student-exam-performance-indicator
-
Install dependencies: pip install -r requirements.txt
-
Run the Flask app: python app.py
-
Open your browser and go to
http://127.0.0.1:5000/
to access the web app.
- Data Upload: Teachers can upload student performance data in CSV format.
- Visualizations: The application will display various visualizations for analyzing the data.
- Prediction: Use the trained model to predict student scores based on inputs such as gender, previous scores, and parental education.
- Report Generation: Teachers can generate performance reports to assist in personalized teaching strategies.
- Addition of More ML Models: Incorporate more advanced algorithms like Neural Networks for improved predictions.
- Dynamic Report Generation: Automatically generate PDFs of performance analysis and recommendations for each student.
- User Authentication: Implement a secure login system for teachers and administrators.
- Integration with Real-Time Data: Allow the app to fetch data directly from student databases in real-time.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the Flask and Scikit-learn communities for their invaluable resources.
- Thank you to all contributors for making this project possible!