9.13 Exercise

  1. 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).
  2. 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.
  3. 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?
  4. Shorty outline the advantages and disadvantages of the validation set approach, Leave-one-out cross-validation (LOOCV) and k-Fold Cross-Validation.