Step 1 loads the package and step 2 reads in the data file.
Step 3 creates a prediction object based on the probabilities and class labels passed in as arguments. In the current examples, our class labels are 0 and 1, and by default, 0 becomes the failure class and 1 becomes the success class. We will see in the There's more... section of this recipe how to handle the case of arbitrary class labels.
Step 4 creates a performance object based on the data from the prediction object. We indicate that we want the true positive rate and false positive rate.
Step 5 plots the performance object. The plot function does not plot the diagonal line indicating the ROC threshold, and we add a second line of code to get that.
We generally ...