Cross Validation
Part 2: Auto dataset revisited
We also used the auto dataset two weeks ago in lab 6. We used it with LDA and QDA. Both methods in R provide a CV argument that will compute a LOOCV estimate for us. If we want to compute a k-fold cross validation estimate when k is not equal to the number of instances, we have to either write our own code or find another library to use. Here we will write our own code! Write a function that accepts a dataframe, a model-building function (either lda or qda), and a value for K and returns an error estimate and its variance for k-fold cross validation. Use this function to generate values for the same kind of table you made in part 1. Compare these values to using the training set and a validation set to estimate the error rates, too. Finally, include a paragraph summarizing and explaining the results just as you did in part 1.
Note: The lab6 he is referring is attached here. That is where the auto dataset being analyzed
5 years ago
20
- BSHS 322 Communications skills for the Human Services Professional
- ACC 455 Final Exam
- Chapter 12 & 13-Accounting
- history power point
- Failing to reject the null hypothesis when it is false is an example of
- MHR 6551 Test 3
- acc 206 week two assingment
- Week 4 Discussion1
- For Nyanya only
- A major problem with cramming for an exam is that it overloads the capacity of _____