This repository contains a simple implementation of Linear Regression using Gradient Descent in Python. The goal is to learn the relationship between study hours and exam scores from a small dataset.
- ๐ข Predict exam scores based on study hours.
- ๐งฎ Implements gradient descent manually without any ML libraries.
- ๐ Tracks error (MSE) across epochs.
- ๐ Plots for data, regression line, and MSE per epoch.
| File/Folder | Description |
|---|---|
linear_regression.py |
Core script containing the linear regression implementation |
data2.csv |
Dataset: study hours vs exam scores |
images/ |
Folder containing generated plots |
The dataset contains two columns:
studytime(float): Number of hours studiedscore(float): Exam score received
python linear_regression.pyMake sure data2.csv is present in the same directory as linear_regression.py.
Yash Dhankhar
Feel free to use, learn, and modify!


