auc - Area under ROC curve

rlscore.measure.auc(Y, P)

Area under the ROC curve (AUC).

A performance measure for binary classification problems. Can be interpreted as an estimate of the probability, that the classifier is able to discriminate between a randomly drawn positive and negative training examples. An O(n*log(n)) time implementation, with correction for tied predictions.

If 2-dimensional arrays are supplied as arguments, then AUC is separately computed for each column, after which the AUCs are averaged.

Parameters:
Y : {array-like}, shape = [n_samples] or [n_samples, n_labels]

Correct labels, must belong to set {-1,1}

P : {array-like}, shape = [n_samples] or [n_samples, n_labels]

Predicted labels, can be any real numbers.

Returns:
auc : float

number between 0 and 1