Session Ready
Exercise

Predicting churn

In this exercise, you will use the predict() function in the pROC package to predict the churn probability of the customers in the test set, test_set. The function has three arguments:

  1. The model used to make the predictions.
  2. newdata: The dataset the model should be applied to.
  3. type: the type of prediction. We want to know the probability of churn, so we choose either response or prob.

Use the function predict() to predict the churn probability of the customers in test_set.

Instructions 1/4
undefined XP
  • 1
    • Make predictions with firstModel.
    • type should equal response.
    • Name the predictions firstPredictions.
    • 2
      • Make predictions with secondModel.
      • type should equal response.
      • Name the predictions secondPredictions.
    • 3
      • Make predictions with thirdModel.
      • type should equal response.
      • Name the predictions thirdPredictions.
    • 4
      • Make predictions with rfModel.
      • type should equal prob.
      • Name the predictions rfPredictions.