Measure AUC
In this exercise, you will compute the AUC of your churn prediction models to find the best one.
Use the auc()
function in the pROC
package.
The function has two arguments:
- The true churn label in the test set,
test_set$Future
. - The model prediction:
a. For logistic regression, it is the prediction obtained from thepredict
function.
b. For random forest, it is the second column of the prediction obtained from thepredict
function.
The objects firstPredictions
, secondPredictions
, thirdPredictions
, and rfPredictions
have been loaded for you.
Which model has the highest AUC value?
Diese Übung ist Teil des Kurses
Predictive Analytics using Networked Data in R
Interaktive Übung
Setze die Theorie in einer unserer interaktiven Übungen in die Praxis um
