Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Digital Systems Design Using Verilog

Authors: Charles Roth, Lizy K. John, Byeong Kil Lee

1st edition

1285051076, 978-1285051079

More Books

Students also viewed these Accounting questions

Question

Show that if B is a subset of A, then O(B) Answered: 1 week ago

Answered: 1 week ago

Question

=+a) Is this an experiment or observational study? Explain.

Answered: 1 week ago