roc_cut | R Documentation |
Calculates the "optimal" cutoff for a classifier from a ROC curve. This is the cutoff that minimises the distance from the point (FPR = 0, TPR = 1). Also returns sensitivity and specitivity for this cutoff, the AUC of the ROC curve, and optionally plots the curve together with the distance measure.
roc_cut(pred, actual, plot = T)
pred |
A vector of prediction probabilities. |
actual |
A vector of outcome classes corresponding to |
plot |
Logical indicating whether to plot a ROC curve together with distance from the optimal corner. |
Adapted from https://www.r-bloggers.com/a-small-introduction-to-the-rocr-package/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.