Learn practical skills, build real-world projects, and advance your career

Predicting Prices of Used Cars in the UK

alt

These days, as new car prices go way up and availability of new cars becomes more limited, renewed interest in used cars is prevalent. Oftentimes, used cars can be as good as new ones, especially with various Certified Pre-Owned programs offered by most manufacturers. In this project we explore just under 100,000 used car sales transactions and see if we can accurately predict a car's price. This can be useful for both buyers and sellers.

We'll use the dataset from the 100,000 UK Used Car Data Set dataset on Kaggle.

In this notebook we will:

  • Read in the data, creating a Pandas DataFrame object. Clean the data, removing outliers and invalid values.

  • Prepare the data for modeling.

  • create a baseline model for comparison to the best runs of our model selections

  • Train & evaluate different machine learning models.

  • prepare data sets for training, validation, and testing

  • Report the final performance of the model(s) and summarize.

  • compare the best model results with the baseline

!pip install jovian --upgrade --quiet
WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available. You should consider upgrading via the '/opt/miniconda3/envs/my-env/bin/python -m pip install --upgrade pip' command.
import jovian

Read in the data from Kaggle.

import opendatasets as od
import os
import os.path
from os import path