matthiasm@8: function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin) matthiasm@8: % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color) matthiasm@8: matthiasm@8: if nargin < 3, col = []; end matthiasm@8: matthiasm@8: [scale01] = process_options(varargin, 'scale01', 1); matthiasm@8: matthiasm@8: [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass); matthiasm@8: matthiasm@8: if ~isempty(col) matthiasm@8: h=plot(falseAlarmRate, detectionRate, [col '-']); matthiasm@8: %set(h, 'linewidth', 2); matthiasm@8: ex = 0.05*max(falseAlarmRate); matthiasm@8: ey = 0.05; matthiasm@8: if scale01 matthiasm@8: axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey]) matthiasm@8: else matthiasm@8: % zoom in on the top left corner matthiasm@8: axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey]) matthiasm@8: end matthiasm@8: grid on matthiasm@8: ylabel('detection rate') matthiasm@8: %xlabel('# false alarms') matthiasm@8: xlabel('false alarm rate') matthiasm@8: end matthiasm@8: