Giter Site home page Giter Site logo

bahau88 / co2-emission-by-cars Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d0r1h/co2-emission-by-cars

0.0 0.0 0.0 3.18 MB

A Machine Learning Model to predict CO2 Emissions in different type of Cars

Home Page: https://coemission.herokuapp.com/

Python 1.48% HTML 0.31% Jupyter Notebook 98.20% Procfile 0.01%

co2-emission-by-cars's Introduction

CO2 Emission by Cars

A reliable End to End Machine Learning Model to predict CO2 Emissions in different type of Cars.

Description

The task is to build a machine learning model to predict CO2 emissions by different types of cars based on features such as:

  • Model of car
  • Engine Size (in Litre)
  • Number of cylinders
  • Class of vehicle
  • Fuel consumption (on highways, in city roads)

Project also aims at testing the influence of different independent features on the emission of CO2 using statistical methods.

DataSet:

  • The dataset has been taken from the Canada Government official open data website and is available in kaggle
  • Cleaned and processed version of the data can be accessed from here
  • Dataset contains 7385 datapoints and 12 columns.

Notebook:

Notebook contains the EDA, data processing, and model building ideas.

Notebook Colab Kaggle
CO2 Emission Open In Colab Kaggle

Models

We experimented with different methods for model building

  • OLS Regression
  • Ridge Regression
  • Lasso Regression
  • Elastic Net Regression

Project Pipeline

Techstack

Python version : 3.7
Packages: pandas, numpy, seaborn, sklearn, mlxtend, statsmodels
Cloud: heroku

Usage [running locally]:

conda create -n envname python=3.7
activate envname
git clone https://github.com/d0r1h/CO2-Emission-by-Cars.git
cd CO2-Emission-by-Cars
pip install -r requirements.txt
python app.py

Results

  • Ridge Regression (with alpha = 0.5) has been the most effective in reducing RMSE.
  • The exact combination of features responsible for high CO2 emissions cannot be predicted Since all the features are highly correlated.
  • Following image shows score table for different models

Inference Demo:

Application is deployed on heroku and can be accessed at https://coemission.herokuapp.com/ and following data can be used to test the application.

Engine Size Cylinders Fuel Consumption City Fuel Consumption Hwy Fuel Consumption Comb Fuel Consumption Comb (mpg) Fuel Types Transmission type Make Vechicle Class CO2 Emissions
3.5 6 11.9 7.7 10 28 z AS6 Luxury Sedan 230
3.5 6 11.8 8.1 10.1 28 z AS6 Luxury Sedan 232

co2-emission-by-cars's People

Contributors

d0r1h avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.