https://github.com/izhaan0/predict-marks-based-on-study-hours
Student Marks Predictor is a machine learning project that predicts a studentโs exam scores based on the number of study hours. It uses Linear Regression to learn the relationship between study hours and marks, and provides both command-line and interactive Streamlit web interfaces for prediction and visualization.
https://github.com/izhaan0/predict-marks-based-on-study-hours
data-visualization joblib jupyter-notebook machine-learning machine-learning-algorithms matplotlib-pyplot numpy pandas pandas-dataframe pickle python scikit-learn seaborn
Last synced: about 1 month ago
JSON representation
Student Marks Predictor is a machine learning project that predicts a studentโs exam scores based on the number of study hours. It uses Linear Regression to learn the relationship between study hours and marks, and provides both command-line and interactive Streamlit web interfaces for prediction and visualization.
- Host: GitHub
- URL: https://github.com/izhaan0/predict-marks-based-on-study-hours
- Owner: izhaan0
- Created: 2025-08-19T07:20:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-19T07:30:52.000Z (6 months ago)
- Last Synced: 2025-08-19T09:52:17.982Z (6 months ago)
- Topics: data-visualization, joblib, jupyter-notebook, machine-learning, machine-learning-algorithms, matplotlib-pyplot, numpy, pandas, pandas-dataframe, pickle, python, scikit-learn, seaborn
- Language: Jupyter Notebook
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
๐ Student Marks Predictor
๐ Project Overview
This project predicts **student marks based on the number of study hours** using a **Linear Regression model**.
Itโs a beginner-friendly **Machine Learning regression problem** that demonstrates:
* Data preprocessing
* Model training & evaluation
* Deployment with Streamlit (optional)
---
๐ Features
* Predict marks (%) by entering study hours
* Visualization of study hours vs marks
* Linear Regression model implementation
* Simple and interactive **web app** using Streamlit
---
๐ Tech Stack
Language: Python ๐
Libraries:
* `numpy` โ numerical operations
* `pandas` โ dataset handling
* `matplotlib`, `seaborn` โ data visualization
* `scikit-learn` โ Linear Regression & evaluation
* `joblib` / `pickle` โ model saving
* `streamlit` โ web app (for deployment)
---
๐ Project Structure
```
student-marks-predictor/
โ
โโโ data/
โ โโโ student_scores.csv # Dataset
โ
โโโ notebooks/
โ โโโ EDA.ipynb # Exploratory data analysis
โ
โโโ src/
โ โโโ preprocess.py # Data preprocessing
โ โโโ train_model.py # Train Linear Regression model and evaluation of model
โ โโโ predict.py # Prediction function
โ
โโโ app/
โ โโโ app.py # Streamlit web application
โ
โโโ models/
โ โโโ linear_regression.pkl # Saved trained model
โ
โโโ requirements.txt # Dependencies
โโโ README.md # Project documentation
```
๐ Workflow
1. Load Data โ `pandas`
2. EDA โ Visualize Hours vs Marks
3. Train Model โ `LinearRegression` from scikit-learn
4. Evaluate Model โ MAE, MSE, Rยฒ Score
5. Save Model โ `joblib`
6. Deploy App โ User enters hours โ Predict marks
๐ฎ Example Prediction
Input: `5 hours of study`
Output: `Predicted Marks โ 55%`
โถ๏ธ How to Run
๐ง 1. Clone Repo
```bash
git clone https://github.com/your-username/student-marks-predictor.git
cd student-marks-predictor
```
๐ฆ 2. Install Dependencies
```bash
pip install -r requirements.txt
```
๐๏ธ 3. Train Model
```bash
python src/train_model.py
```
๐ 4. Run Web App
```bash
streamlit run app/app.py
```
๐ Results
* Regression line fitting study hours vs marks
* Rยฒ Score close to **1.0** for small datasets
* Predictions within a reasonable error margin
๐ค Contributing
Contributions are welcome!
* Fork the repo
* Create a new branch
* Make changes and commit
* Submit a pull request
๐ License
This project is licensed under the **MIT License**.