Function for display of rocs (receiver operator characteristic curves).


function [h,miss,stds] = plotRoc( D, varargin )


 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.

  [h,miss,stds] = plotRoc( D, prm )

  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

  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

  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)]';
  legend( hs, {'roc1','roc2'} ); xlabel('fp'); ylabel('fn');

 See also

 Piotr's Computer Vision Matlab Toolbox      Version 3.02
 Copyright 2014 Piotr Dollar.  []
 Licensed under the Simplified BSD License [see external/bsd.txt]

Generated by m2html © 2003