/ft_linear_regression

Primary LanguagePythonMIT LicenseMIT

Linear Regression Car Price Estimation

This repository contains a simple implementation of linear regression to predict car prices based on mileage.

Regression frames

Installation

First, make sure you have Python installed on your system. Then, install the required dependencies using pip:

pip install -r requirements.txt

Usage

Train the model

To train the linear regression model and save the theta parameters, run:

python trainer.py

Verbose Mode (Animated Scatter Plot)

You can use the --verbose flag to enable a visual animated scatter plot that shows the internal workings of the model during training:

python trainer.py --verbose

Price Prediction

After training the model and saving the theta parameters, you can use the predict.py script to predict a car price based on mileage:

python predict.py

License

This project is licensed under the MIT License.