cindex {gcl}R Documentation

Compute the c-index

Description

The C-index is the probability of the classifier ranking a randomly chosen positive example as more positive than a randomly chosen negative example. It is related to the Wilcoxon rank sum statistic or Mann-Whitney U. It is equivalent to the area under the receiver operating curve.

Usage

cindex(preds, acts)

Arguments

preds A vector of predictions
acts A vector of the actual classes. Must be 0 or 1.

Value

The c-index.

Author(s)

Staal A. Vinterbo staal@dsg.harvard.edu

References

J.A. Hanley and B.J. McNeil. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology, 143:29-36, 1982.

See Also

~~objects to See Also as ci.eval

Examples

preds <- runif(10)
acts <- round(runif(10))
cindex(preds,acts)

[Package gcl version 1.06.5 Index]