![](/project/used-car-finder/featured_hu344f3f8e23df59cd8984350d8bfbe95a_1068607_7759fe96fc3506a3cf9a35575a175528.webp)
Car Database
Page | Note |
---|---|
Last Day | Last day of car listings |
Last 7 Days | Last week of car listings |
Last 30 Days | Last month of car listings |
Description
The AutoDev API was accessed to gather the data necessary to train the model. Toyota Camrys were used for this project due to their popularity and desirability. Cars produced before 2015 were not included. There were no mileage parameters, meaning new cars were included in the training set. Additionally, a radius of 150 miles around Boston was imposed for this search. Most (~85%) Camrys that fit this criteria fell into one of four trims: LE, SE, XLE, XSE. These four were the only ones considered for this project.
In the regression model, trim was expanded into dummy (indicator) variables for each trim. Mileage was included as a simple linear effect. Year was incorporated in a complex way: after converting model year into an integer age each age was further log transformed to account for the marginally decreasing depreciation rate with each additional year of age. The rationale behind this decision came from the logic that a change from ‘year 1’ to ‘year 2’ should be more significant than ‘year 6’ to ‘year 7’. Furthermore, each year was granted its own dummy (indicator) variable as well. This added flexibility was introduced to qualify how the data deviates from the assumed log year term. The final model was selected using likelihood ratio tests.
The next step of this project lead me into the area of automation. After generating a script that made a new API call and ran it through the pre-trained regression model. This step produced an estimated price of the car. Comparison of this price with the actual price of the vehicle lead to discount prices. The automation step of this project was a bit tricky but was accomplished with GitHub Actions and YAML. By using YAML files, I enabled an automatic trigger for my API script to run every day. Following this, another script pushed these change to this website.