Skip to content

A simple machine learning project to predict car fuel efficiency (MPG) using Python. The project explores data preprocessing, feature selection, and model building with a focus on learning core ML concepts.

Notifications You must be signed in to change notification settings

mohamed-lifa7/auto-mpg-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Auto-mobile MPG prediction model

1. 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.

About

A simple machine learning project to predict car fuel efficiency (MPG) using Python. The project explores data preprocessing, feature selection, and model building with a focus on learning core ML concepts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published