1. Learn
  2. /
  3. Courses
  4. /
  5. Machine Learning in the Tidyverse

Connected

Exercise

Prepare for cross-validated performance

Now that you know how to calculate the performance metrics for a single model, you are now ready to expand this for all the folds in the cross-validation data frame.

Instructions

100 XP
  • Add the validate_actual binary column for each cross-validation fold by converting all "Yes" values to TRUE.
  • Use model to predict the probabilities of attrition for each cross-validation fold of validate. Convert the predicted probabilities to a binary vector, treating all probabilities greater than 0.5 as TRUE. Name this column validate_predicted.