Exercise

Make a custom trainControl

The wine quality dataset was a regression problem, but now you are looking at a classification problem. This is a simulated dataset based on the "don't overfit" competition on Kaggle a number of years ago.

Classification problems are a little more complicated than regression problems because you have to provide a custom summaryFunction to the train() function to use the AUC metric to rank your models. Start by making a custom trainControl, as you did in the previous chapter. Be sure to set classProbs = TRUE, otherwise the twoClassSummary for summaryFunction will break.

Instructions

100 XP

Make a custom trainControl called myControl for classification using the trainControl function.

  • Use 10 CV folds.
  • Use twoClassSummary for the summaryFunction.
  • Be sure to set classProbs = TRUE.