Function for display of rocs (receiver operator characteristic curves). Display roc curves. Consistent usage ensures uniform look for rocs. The input D should have n rows, each of which is of the form: D = [falsePosRate truePosRate] D is generated, for example, by scanning a detection threshold over n values from 0 (so first entry 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. Plots missRate (which is just 1 minus the truePosRate) on the y-axis versus the falsePosRate on the x-axis. USAGE [h,miss,stds] = plotRoc( D, prm ) INPUTS D - [nx2] n data points along roc [falsePosRate truePosRate] typically ranges from [1 1] to [0 0] (or may be reversed) 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 - [] return miss rates at given fp values (and draw lines) .xLbl - ['false positive rate'] label for x-axis .yLbl - ['miss rate'] label for y-axis OUTPUTS h - plot handle for use in legend only miss - average miss rates at fpTarget reference values stds - standard deviation of miss rates at fpTarget reference values 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 Computer Vision Matlab Toolbox Version 3.02 Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com] Licensed under the Simplified BSD License [see external/bsd.txt]