Skip to content

Linear Regression Model to predict the price of cars based on its features

Notifications You must be signed in to change notification settings

SMAR-5alid/Car-Price-Pridection-with-Machine-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

🚗 Car Price Prediction using Linear Regression 🚗

Hello Everyone, 👋

In this repository, I aim to predict the value of a car based on various features such as the engine size, horsepower, and other features. I used linear regression model to make the prediction and then calculate the accurecy of the model.

Requirements

The following libraries are required to run the code:

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • sklearn

Dataset

The data used for this project is the Car Dataset . The data includes information on different makes and models of cars and their characteristics ,

📍 Link of the Dataset : (https://www.kaggle.com/datasets/krishnasyenugula/automobile-data)

Steps involved in the Project

1️⃣ Data Cleansing

* Dealing with nulls

     I filled the intger null values with mean of its column.

* Data Correletion

     I made correletion on data to know the degree relationships between features and determine if this relationship is direct or reverse 
     and this will help in feature reduction by distinguishing the important features to depend on it in training step.

* Categorical Features transformation

     I turned all categorical features to numerical one to facilitate training model 

2️⃣ Divide data

     First , I divide data into Features & Labels , and then divide it into train & test with test size 20% 

3️⃣ Numerical Feature Scaling

     I scaled data to minimize Bios and prevent outliers between the features.

4️⃣ Apply Linear Regression

     I applied Linear Regression model to the data after training it to pridect the price of cars.

5️⃣ Evaluate the model

     I made this by using mean absolute error and root mean squared error to calculate the accuracy of the model 

6️⃣ Inverse Transformation of scaling

     This step is very important to know the actual price predicted . 

About

Linear Regression Model to predict the price of cars based on its features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published