ROC | ![]() |
Computes Receive Operator Characteristic.
Synopsis:
[FP,FN]=roc(dfce,y)
Description:
It computes false positive rate FP and false negative rate FN
with rescpect to the shift of the bias of given decision function.
The values of the decision function are given in dfce and y
contains true labels (number 1 and/or 2). The vectors dfce and y
must be of the same length.
The bias is shifted from min(dfce) to max(dfce).
Input:
dfce [1 x num_data] Values of decision function returned by
a classifier.
y [1 x num_data] True labels.
Output:
FP [1 x num_data] False positive rate.
FN [1 x num_data] False negative rate.
Example:
data = load('riply_trn');
model = fld(data);
[y_pred,dfce] = linclass(data.X,model);
[FP,FN] = roc(dfce,data.y);
figure; hold on; plot(FP,FN);
xlabel('false positives');
ylabel('false negatives');
See also
CERROR
(c) Statistical Pattern Recognition Toolbox, (C) 1999-2003,
Written by Vojtech Franc and Vaclav Hlavac,
Czech Technical University Prague,
Faculty of Electrical engineering,
Center for Machine Perception
Modifications:
17-may-2004, VF
6-June-2003, VF
24-Feb-2003, VF