Skip to content

beatriangu/ft_linear_regression

Repository files navigation

42 logo

Imagen relacionada con el proyecto

Skill 1: Algorithm and AI Skill 2: Database and Data Objectives: Machine Learning

Introduction

An introduction to AI and Machine Learning. Write your own gradient descent algorithm to train a linear regression model that will be used to predict the price of a car.

First Program: Car Price Prediction

The first program will be used to predict the price of a car based on its mileage. When you launch the program, it will ask you for the mileage and should give you an approximate price of the car.


(django_venv) c4r4s6% python predict.py
Please enter Kilometrage: 60000
Estimated price for 60000 kms: 7184 €
Is it what you expected? (yes/no): yes
Great! I'll buy it!

(django_venv) c4r4s6% python predict.py
Please enter Kilometrage: 50000
Estimated price for 50000 kms: 7393 €
Is it what you expected? (yes/no): no
Sorry to hear that.I'll have to try to adjust my algorithm a little more.

Second Program: Model Training

The second program will be used to train your model. It will read the data set and perform a linear regression on this data.

Bonuses

  • View the data on a graph: without training graph
  • Display the line resulting from your linear regression on this same graph and see if it works! linear regression graph
  • Display the curve resulting from your cost history: cost history curve
  • A program that checks the accuracy of your algorithm:

    (Percentage of accuracy: 73.23%)

Evaluación sheet

Screenshot from 2024-09-06 16-37-46

About

Car price prediction using linear regression trained with gradient descent (from scratch). Includes model training, prediction CLI, and optional visualization/accuracy checks.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages