Car Price Prediction App

Abril Susana

2025-02-23

Introduction

This is a Car Price Prediction Shiny app that predicts the price of a car based on its age, mileage, and make. The model uses a Random Forest algorithm to estimate the price of a car.

We use a combination of input features such as: - Car age (in years) - Mileage (in thousands of miles) - Car make (e.g., Toyota, BMW, Audi)

Let’s take a quick look at the app’s functionality.

How the App Works

The app takes user inputs for Car Age, Mileage, and Car Make. Based on these inputs, the app uses a trained Random Forest model to predict the car’s price.

Example:

  1. Enter car details in the sidebar.
  2. Press the “Predict Car Price” button.
  3. The app returns the predicted price of the car and visualizes the relationship between mileage and price.
## [1] 45000

The Random Forest Model

We trained the model using historical car data with the following features:

Age: The age of the car in years. Mileage: The number of miles driven (in 1000 miles). Make: The brand of the car (e.g., Toyota, BMW).

The model was trained to predict car prices based on the given data, using Random Forest’s ensemble learning method.

## randomForest 4.7-1.1
## Type rfNews() to see new features/changes/bug fixes.

Predicting Car Prices

Once trained, the app allows users to predict car prices by entering the following details:

Car Age, Mileage, and Car Make

For example, here’s how the app predicts the price for a 5-year-old BMW with 50,000 miles:

##        1 
## 27113.33

Conclusion

The app provides a simple user interface and visualizations to help users understand the relationship between car features and predicted price.

You can use the application by clicking on this link: https://asusana.shinyapps.io/car-price-prediction/