A machine learning web application that predicts student exam scores based on various behavioral and lifestyle factors.
This project uses a trained machine learning model to predict exam scores by analyzing key factors that influence student academic performance. The application is built with Streamlit, making it easy to use and interactive.
- Interactive Web Interface: Built with Streamlit for an intuitive user experience
- Real-time Predictions: Get instant exam score predictions based on input parameters
- Key Factors Analyzed:
- Study hours per day
- Attendance percentage
- Mental health rating
- Sleep hours per night
- Part-time job status
├── app.py # Streamlit web application
├── notebook.ipynb # Jupyter notebook with data analysis and model training
├── best_model.pkl # Pre-trained machine learning model
├── student_habits_performance.csv # Dataset used for training
├── requirements.txt # Python dependencies
└── README.md # This file
- Python 3.7 or higher
- pip (Python package manager)
- Clone the repository:
git clone https://github.com/VanshP018/marks_predictor.git
cd marks_predictor- Install required dependencies:
pip install -r requirements.txtRun the Streamlit application:
streamlit run app.pyThe application will open in your default web browser. Use the interactive sliders and dropdowns to input student information and get a predicted exam score.
- Study Hours per Day: 0-12 hours (slider)
- Attendance Percentage: 0-100% (slider)
- Mental Health Rating: 1-10 scale (slider)
- Sleep Hours per Night: 0-12 hours (slider)
- Part-time Job: Yes/No (dropdown)
The project includes:
- Data Analysis: Comprehensive exploratory data analysis in the Jupyter notebook
- Feature Engineering: Processing of student habit data
- Model Training: Machine learning model trained on
student_habits_performance.csv - Prediction: Pre-trained model saved as
best_model.pkl
The model constrains predictions to a 0-100 score range for realistic output.
The student_habits_performance.csv file contains historical data on student habits and their corresponding exam scores, used to train the predictive model.
- Python 3: Primary programming language
- Streamlit: Web framework for building the interactive app
- Scikit-learn: Machine learning library
- Pandas: Data manipulation and analysis
- NumPy: Numerical computing
- Matplotlib & Seaborn: Data visualization
See requirements.txt for all dependencies:
- streamlit==1.28.1
- pandas>=1.3.0
- numpy>=1.21.0
- matplotlib>=3.4.0
- seaborn>=0.11.0
- scikit-learn>=1.0.0
- joblib>=1.1.0
- Add model retraining capability with new data
- Include additional factors (e.g., subject, grade level)
- Deploy to cloud platform (Heroku, AWS, etc.)
- Add model explainability features (SHAP values, feature importance)
- Create prediction history tracking
This project is open source and available for educational purposes.
For questions or suggestions, please open an issue on the GitHub repository.