This Python project implements a simple linear regression model using fake data generated with NumPy. The script generates random data, fits a linear regression model using the normal equation, and visualizes the original data points along with the regression line using Matplotlib.
This project serves as a foundational example for understanding linear regression modeling. It generates synthetic data, trains a linear regression model, and visualizes the results using Matplotlib. The code is modularized for better organization and readability.
-
Clone the repository:
git clone https://github.com/yourusername/linear-regression.git
-
Navigate to the project directory:
cd linear-regression
-
Dependencies:
pip install -r requirements.txt
to install libraries
NumPy
Matplotlib
-
Run the script:
python3 script.py