annotate toolboxes/FullBNT-1.0.7/KPMtools/plotROC.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin)
Daniel@0 2 % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color)
Daniel@0 3
Daniel@0 4 if nargin < 3, col = []; end
Daniel@0 5
Daniel@0 6 [scale01] = process_options(varargin, 'scale01', 1);
Daniel@0 7
Daniel@0 8 [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass);
Daniel@0 9
Daniel@0 10 if ~isempty(col)
Daniel@0 11 h=plot(falseAlarmRate, detectionRate, [col '-']);
Daniel@0 12 %set(h, 'linewidth', 2);
Daniel@0 13 ex = 0.05*max(falseAlarmRate);
Daniel@0 14 ey = 0.05;
Daniel@0 15 if scale01
Daniel@0 16 axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey])
Daniel@0 17 else
Daniel@0 18 % zoom in on the top left corner
Daniel@0 19 axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey])
Daniel@0 20 end
Daniel@0 21 grid on
Daniel@0 22 ylabel('detection rate')
Daniel@0 23 %xlabel('# false alarms')
Daniel@0 24 xlabel('false alarm rate')
Daniel@0 25 end
Daniel@0 26