% % Examples 9.7 % % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; clc; addpath('../../Code/CSTool'); load tibetan; nA = 17; % <- we are told that the first 17 correspond to the first class nB = 15; % <- the next class members .. n = nA+nB; if( 1 ) % <- assume that the ordering of the data matrix is THIS way ... the first 17 rows are class A etc ... cA = tibetan(1:nA,:); cB = tibetan((nA+1):(nA+nB),:); else cB = tibetan(1:nB,:); cA = tibetan((nB+1):(nA+nB),:); end pfa = linspace(0,1,100); pfa(1)=[]; pfa(end)=[]; [pcc,thresh] = csrocgen(cA,cB,1,pfa); figure; plot( pfa, pcc, '-go' ); grid on; xlabel( 'probability of false alarm' ); ylabel( 'probabilty of detection' ); title( 'ROC curve for the tibetan data' ); saveas( gcf, 'prob_9_6', 'epsc' );