An open API service indexing awesome lists of open source software.

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.

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**.