Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

roc

Compute the receiver operating characteristic (ROC) curve.


Description

This function computes the receiver operating characteristic (ROC) curve required for the auc function and the plot function.

Usage

roc(predictions, labels)

Arguments

predictions

A numeric vector of classification probabilities (confidences, scores) of the positive event.

labels

A factor of observed class labels (responses) with the only allowed values {0,1}.

Value

A list containing the following elements:

cutoffs

A numeric vector of threshold values

fpr

A numeric vector of false positive rates corresponding to the threshold values

tpr

A numeric vector of true positive rates corresponding to the threshold values

Author(s)

Authors: Michel Ballings and Dirk Van den Poel, Maintainer: Michel.Ballings@UGent.be

References

Ballings, M., Van den Poel, D., Threshold Independent Performance Measures for Probabilistic Classifcation Algorithms, Forthcoming.

See Also

Examples

data(churn)

roc(churn$predictions,churn$labels)

AUC

Threshold independent performance measures for probabilistic classifiers.

v0.3.0
GPL (>= 2)
Authors
Michel Ballings and Dirk Van den Poel
Initial release
2013-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.