Mercurial > hg > camir-aes2014
comparison toolboxes/FullBNT-1.0.7/KPMtools/plotROC.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin) | |
2 % function [falseAlarmRate, detectionRate, area, th] = plotroc(confidence, testClass, color) | |
3 | |
4 if nargin < 3, col = []; end | |
5 | |
6 [scale01] = process_options(varargin, 'scale01', 1); | |
7 | |
8 [falseAlarmRate detectionRate area th] = computeROC(confidence, testClass); | |
9 | |
10 if ~isempty(col) | |
11 h=plot(falseAlarmRate, detectionRate, [col '-']); | |
12 %set(h, 'linewidth', 2); | |
13 ex = 0.05*max(falseAlarmRate); | |
14 ey = 0.05; | |
15 if scale01 | |
16 axis([0-ex max(falseAlarmRate)+ex 0-ey 1+ey]) | |
17 else | |
18 % zoom in on the top left corner | |
19 axis([0-ex max(falseAlarmRate)*0.5+ex 0.5-ey 1+ey]) | |
20 end | |
21 grid on | |
22 ylabel('detection rate') | |
23 %xlabel('# false alarms') | |
24 xlabel('false alarm rate') | |
25 end | |
26 |