roc_cut: Optimal cut for ROC curve

View source: R/roc.R

roc_cutR Documentation

Optimal cut for ROC curve

Description

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.

Usage

roc_cut(pred, actual, plot = T)

Arguments

pred

A vector of prediction probabilities.

actual

A vector of outcome classes corresponding to pred.

plot

Logical indicating whether to plot a ROC curve together with distance from the optimal corner.

Details

Adapted from https://www.r-bloggers.com/a-small-introduction-to-the-rocr-package/.


jedwards24/jemodel documentation built on July 1, 2023, 3:59 p.m.