Learn R Programming

RobustMetrics (version 0.1.1)

ROC_curve: ROC curve

Description

Plot ROC curve together with recall / 1-precision curve.

Usage

ROC_curve(actual, predicted, d = c(0.01, 0.05, 0.1, 0.5))

Value

ROC curve.

Arguments

actual

A vector of actual values (1/0 or TRUE/FALSE)

predicted

A vector of predicted probabilities (numeric values in \([0,1]\))

d

A vector of length 4

Details

Instead of a precision-recall curve, a recall / 1-precision curve is plotted in the same coordinate system as the ROC curve.

Grey circles show the corresponding MCC optimal points; black symbols show points optimal with respect to the robust MCC for different values of d.

References

Holzmann, H., Klar, B. (2024). Robust performance metrics for imbalanced classification problems. arXiv:2404.07661. LINK

Examples

Run this code
actual <- rf.data[, 1]
predicted <- rf.data[, 2]
ROC_curve(actual, predicted, d=c(0.01,0.02,0.1,0.5))

Run the code above in your browser using DataLab