Skip to content

TolgaKilinckaya/mercedes_ml_price_predict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mercedes Car Prices

Analyzing the Data

First of all, to get an overview of the dataset, I analyzed the characteristics of the first 5 vehicles, which include Year, Price, Mileage, Tax, Fuel Consumption and Engine Volume.

1

I also examined the general information of this data set. In this table, the Number, Mean, Standard Deviation and Minimum-Maximum values of the characteristics of the vehicles are the values that are important for me.

2

I then examined the distribution of the prices of the vehicles on the graph. I thought that the small number of high-priced vehicles and the fact that they were not normally distributed reduced the reliability of the data set.

3

I also examined the correlation of vehicle prices with other features. As can be seen here, the Mil feature seems to have the highest impact on vehicle prices. I also analyzed this on a graph.

image 4

Correction of Data

First of all, I removed the anomalous distribution of the high-priced vehicles that first caught my eye. I removed the top 1% (131 vehicles) from the data set. Then I examined the new values together with the graph. I obtained a graph with a more normal distribution.

2-1 2-2

I then listed the average prices of the vehicles by year and found that the prices increased from lower to higher models, as they should. However, there was an exception for 1970 vehicles. I removed that data from the data set.

2-3 2-4

Creating the Model

First of all, I created a model consisting of 5 layers with 12 neurons (dense). I chose the regression approach of the model as ReLU.

image 2-5

Then I trained my model with batch_size=250 (data loading packet size), epochs=300 (number of times to rotate the data set).

Evaluation of the Model

I examined the missing data in the training and the missing data in the data set on the graph. I saw that the lines are close to each other and gradually approaching zero, as they should be.

3-1

I then made a new forecast with the data I had removed from the dataset for testing. I used a graph to observe how the new forecasts matched the actual prices. The green line in the middle shows what should happen. When I calculated the average margin of error, I found that prices varied by +/- £3137.

3-2

Then, as a final check, I had the price of a single vehicle estimated. The actual price of the vehicle was £65,980, but the estimate came to £63,644. This gives a margin of error of approximately 0.035.

image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published