Skip to content

Munees11/Auto-MPG-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Predicting the Fuel consumption of cars

Problem Description

The basic idea of analysing the Auto mpg dataset is to get a fair idea about the factors affecting the aggregate fuel consumption of each car.

Cars of different variants of different models of various Car manufacturing companies from origin countries such as USA, Japan and Europe.

Fuel consumption of car is affected by various factors such as Model year, Horsepower, Number of Cylinders present, displacement, Weight and Acceleration of the car.

We need to find which factors mostly affect the Fuel consumption of a car in order to improve the mpg value.

Hence build a model to predict the mpg value of each car.

Features on data set

cylinders: contains the number of cylinders present in the car

displacement: contains the Displacement of the car

horsepower: contains the Horsepower of the car

weight: contains the weight of the car

acceleration: contains the Acceleration of the car

model_year: contains the model year of the car

origin: contains the origin country which car belong to

car_name: contains the name of the car(Brand-Model-Variant)

Target Variable

mpg: contains the fuel consumption value(in Miles per Gallon) for car

Model description

• Numpy, Pandas, Matplotlib, Seaborn libraries have been used for Data Cleaning, Exploratory Data Analysis, and Data Visualization.

• Categorical Features are encoded using OneHotEncoder and LabelEncoder.

• Feature Scaling, and Feature Selection Techniques have been performed.

• Linear Regression, Support Vector Regressor, Random forest Regressor, Gradient boosting Regressor model have been used to predict the mpg values.

• Accuracy score: 91% using Random Forest Regressor.

Inference

Car's Fuel consumption(in mpg) is mostly affected by weight and Displacement of the car.