ft_linear_regression

If you thing this is usefull, you can support me by sending some eth at : 0x343901374AdF3AFAc8EA1eC1Fb00a75F904eD48E

Description

Machine learning is more and more use in today word, from creating image to weather forcast, passing by creating bots that beat humain in chess game.

Ft_linear_regression is a 42 project that introduct you to machine learning.

You have to predict the price of a car ðŸš— with the km as input.

It let you discover the power of linear regression and gradient descent.

To predict the price of the car you have to use the mathematics formula of linear regression:

You have to use these mathematics fomulars to get both Î¸.

This will give you Î¸0 :

This will give you Î¸1 :

A default dataset is provided

Explanation

Machine learning work amost everytime with normalized data.

A normalized dataset is just a way to set the dataset in a range that is more easy to work

e.g : set all values between 0-1

When your dataset is normalized you can work on it to find Î¸ values.

We will use a gradient descent algorithme to get a more precise value possible of both Î¸.

Gradient descent is a first-order iterative optimization algorithm for finding a local minimum of a differentiable function.

We will iterate n number of time over the values in the dataset, to calculate the derivation.

When you subtract the derivation to the actual values in the dataset, you get the loss.

With this loss you can ajust the learning rate in the next iteration and try to optimise the values of both Î¸, to get the smaller loss.

After some iteration, you will see that the values of both Î¸ and the loss will stabilise.

Price : 3650 â‚¬
T0 : 0T1 : 0

Graph datas

Dataset prices / km
Prices / km, Ordered by km
Prediction prices / km
Prediction prices / km, Ordered by km