Question
For problem , instead of implementing validation set approach, proceed to use leave one-out cross-validation (function knn.cv()). Run it for K = 1,3,10 and compare
For problem , instead of implementing validation set approach, proceed to use leave one-out cross-validation (function knn.cv()). Run it for K = 1,3,10 and compare the resulting CV errors. Use all observations of Auto data set for relevant predictors, not just the ”training subset” (as we are not doing any train/test subdivision here).
(a) Run set. seed(1) command prior to each cv. knn() call, for uniformity of the results.
(b) First do it for data in its original form (as you had in 5(d), no scaling). What are the test errors? Which method wins? Show the code for just one of K values (e.g. K = 3).
(c) Then do it for scaled data (as you had in 5(e)). What are the test errors? Which method wins? Show the code for just one of K values (e.g. K = 3)
(d) Which results should we trust more- validation set approach from problem 5? Or CV results here? Why?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
a K 1 LeaveOneOut CrossValidation Error 01464286 ...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 StartedRecommended Textbook for
Digital Systems Design Using Verilog
Authors: Charles Roth, Lizy K. John, Byeong Kil Lee
1st edition
1285051076, 978-1285051079
Students also viewed these Accounting questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App