Skip to content

VanshP018/marks_predictor

Repository files navigation

Student Exam Score Predictor

A machine learning web application that predicts student exam scores based on various behavioral and lifestyle factors.

Overview

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.

Features

  • 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

Project Structure

├── 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

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package manager)

Steps

  1. Clone the repository:
git clone https://github.com/VanshP018/marks_predictor.git
cd marks_predictor
  1. Install required dependencies:
pip install -r requirements.txt

Usage

Run the Streamlit application:

streamlit run app.py

The application will open in your default web browser. Use the interactive sliders and dropdowns to input student information and get a predicted exam score.

Input Parameters

  • 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)

Model Details

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.

Dataset

The student_habits_performance.csv file contains historical data on student habits and their corresponding exam scores, used to train the predictive model.

Technologies Used

  • 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

Requirements

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

Future Improvements

  • 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

License

This project is open source and available for educational purposes.

Contact

For questions or suggestions, please open an issue on the GitHub repository.

Releases

No releases published

Packages

 
 
 

Contributors