


Function for display of rocs (receiver operator characteristic curves).
Displays nice clearly visible curves. Consistent usage ensures uniform
look for rocs. The input D should have n rows, each of which is of the
form [false-positive rate true-positive rate]. D is generated, for
example, by scanning a detection threshold over n values from 0 (so first
entry in D is [1 1]) to 1 (so last entry is [0 0]). Alternatively D can
be a cell vector of rocs, in which case an average ROC will be shown with
error bars.
USAGE
[h,det] = plotRoc( D, prm )
INPUTS
D - [nx2] n data points along roc (falsePos/truePos)
prm - [] param struct
.color - ['g'] color for curve
.lineSt - ['-'] linestyle (see LineSpec)
.lineWd - [4] curve width
.logx - [0] use logarithmic scale for x-axis
.logy - [0] use logarithmic scale for y-axis
.marker - [''] marker type (see LineSpec)
.mrkrSiz - [12] marker size
.nMarker - [5] number of markers (regularly spaced) to display
.lims - [0 1 0 1] axes limits
.smooth - [0] if T compute lower envelop of roc to smooth staircase
.fpTarget - [-1] if>0 plot line and return detection rate at given fp
OUTPUTS
h - plot handle for use in legend only
det - detection rate at fpTarget (if fpTar specified)
EXAMPLE
k=2; x=0:.0001:1; data1 = [1-x; (1-x.^k).^(1/k)]';
k=3; x=0:.0001:1; data2 = [1-x; (1-x.^k).^(1/k)]';
hs(1)=plotRoc(data1,struct('color','g','marker','s'));
hs(2)=plotRoc(data2,struct('color','b','lineSt','--'));
legend( hs, {'roc1','roc2'} ); xlabel('fp'); ylabel('fn');
See also
Piotr's Image&Video Toolbox Version 2.41
Copyright 2009 Piotr Dollar. [pdollar-at-caltech.edu]
Please email me if you find bugs, or have suggestions or questions!
Licensed under the Lesser GPL [see external/lgpl.txt]