Exercise
- Use and reinspect the code you developed for Exercise 8.7 in which you compared a model with two predictors (
age
and priors_count
) to a model with three predictors (race
, sex
, juv_fel_count
).
- Instead of splitting the dataset yourself use first use Leave-one-out cross-validation (LOOCV) to estimate the test error rate for the two models.
- Then, use k-Fold Cross-Validation to estimate the test error rate. Compare k-Fold Cross-Validation using 5 folds (k = 5) and 20 folds (k = 20). Do you find any differences?
- Shorty outline the advantages and disadvantages of the validation set approach, Leave-one-out cross-validation (LOOCV) and k-Fold Cross-Validation.