Generating ROC charts
When using classification techniques, we can rely on the technique to classify cases automatically. Alternately, we can rely on the technique to only generate the probabilities of cases belonging to various classes and then determine the cutoff probabilities ourselves. receiver operating characteristic (ROC) charts help with the latter approach by giving a visual representation of the true and false positives at various cutoff levels. We will use the ROCR
package to generate ROC charts.
Getting ready
If you have not already installed the ROCR
package, install it now. Load the data files for this chapter from the book's website and ensure that the rocr-example-1.csv
and rocr-example-2.csv
files are on your R working directory. ...
Get R: Recipes for Analysis, Visualization and Machine Learning now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.