/42-ft_linear_regression

The ft_linear_regression project at 42

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

ft_linear_regression

Requirements

Python 3 and matplotlib.

Usage

Train to get theta0 and theta1 first:

python train.py

You can then estimate a price for a given mileage:

python estimate.py [mileage]

To see the effect of changing the learning rate with the given parameters you can use learning_rate.py.
This will display a graph with the sum of squarred residuals for 1000 iterations.

python learning_rate.py

Bonuses

  • Graph with dataset and trained linear regression line
  • Graph with the effect of different learning rates

Resources