Question
11. (15 pts) toyota.csv include the listings of toyota used cars. Suppose that you are going to buy two toyota used cars and their specifications
11. (15 pts) toyota.csv include the listings of toyota used cars. Suppose that you are going to buy two toyota used cars and their specifications are
model year transmission mileage fuelType tax mpg engineSize
Car 1 RAV4 2019 Automatic 12345 Diesel 150 25 2
Car 2 Camry 2015 Automatic 50000 Hybrid 130 50 3
(a) Use KNN method with K = 10 to predict the prices. 2
(b) Use KNN method with K = 100 to predict the prices.
(c) According to bias-variance trade-off, which one is going to give higher prediction bias and lower prediction variance? Why? (d) Use a linear regression model to predict the prices. (e) Pick one of the coefficients in the model
(d) to interpret. Which predictors are significantly important? (f) Can you tell which method preforms better in terms of prediction accuracy? KNN or linear regression model?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started