Skip to content

charlespv/car-price-prediction-ml

Repository files navigation

Car price prediction

This school project is about predicting second hand cars using machine learning. This project needed skill in Machine learning (linear regression, NLP), data cleaning, and feature engineering. Files :

  • Main files are at the roots of the repo
  • EDA is in the notebook folder
  • autopluspy is a custom python library made for this project

Getting started

  1. git clone the project
  2. create a virtualenv
virtualenv -p python3 venv
  1. Install dependencies
pip install -r requirements.txt
  1. Put the initial dataset into /data folder

  2. Run the jupyter notebook Runbook (available at the roots of the repo) to launch the whole system. Uncomment the last cell if you want to start the streamlit app

Architecture and features

Data Engineering

Input:

  • Initial dataset
  • Eventually new dataset

Process:

  • Spot and remove duplicated content (rows and columns)

  • Spot and remove missing values

  • Adapt data type (categorical, numerical, datetime, string)

  • Provide insight about unique value for each categorical value

  • Provide insight about each numerical value (.describe())

  • Get dummies of categorical variable in One Hot Encoder (update Data Dictionary)

  • Compute age of the car (Online - Model Year)

  • Count vectorizer on 'Options:'

  • Scrap AutoPlus and fuzzy match

  • Use Data Mapper

Output

  • Processed dataset
  • Data Dictionary

Machine Learning

Input:

  • Dataset
  • Data Dictionary

process:

Output:

  • Regression Model
  • Std model
  • Features needed for prediction with possible value

App

Input:

  • Data Dictionary
  • Features list needed for the prediction

Interaction :

  • form
  • display prediction and price tuning range
  • how this car price is considering others cars price (good deal or not)

Cheatsheet Streamlit

## User input : text
Model_year = st.text_input('Model_year', '2010')

About

Car price prediction based on machine learning method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published