/ft_linear_regression

Introductory 42 project to Machine Learning, about linear regression

Primary LanguagePython

ft_linear_regression (subject)

Introduction

Machine learning is a growing field of computer science that may seem a bit complicated and reserved only to mathematicians. You may have heard of neural networks or k-means clustering and don’t undersdand how they work or how to code these kinds of algorithms... But don’t worry, we are actually going to start with a simple, basic machine learning algorithm.

Objective

The aim of this project is to introduce you to the basic concept behind machine learning. For this project, you will have to create a program that predicts the price of a car by using a linear function train with a gradient descent algorithm. We will work on a precise example for the project, but once you’re done you will be able to use the algorithm with any other dataset.

Formulas

Install

git clone https://github.com/ChokMania/ft_linear_regression.git
python -m pip install -r lib.txt

Usage

To train our model

python train.py
This will save the weights trained in `./data/theta.txt`

To predict a value

python main.py
Enter a mileage: n
With: n km, the estimated price is : x