Mercurial > hg > smallbox
diff util/AMT_analysis.m @ 107:dab78a3598b6
changes to comments for couple of scripts
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Wed, 18 May 2011 11:50:12 +0100 |
parents | fc395272d53e |
children |
line wrap: on
line diff
--- a/util/AMT_analysis.m Tue Apr 05 17:03:26 2011 +0100 +++ b/util/AMT_analysis.m Wed May 18 11:50:12 2011 +0100 @@ -1,14 +1,5 @@ function AMT_res = AMT_analysis(Problem, solver) %%% Automatic Music Transcription results analysis -% -% Centre for Digital Music, Queen Mary, University of London. -% This file copyright 2009 Ivan Damnjanovic. -% -% This program is free software; you can redistribute it and/or -% modify it under the terms of the GNU General Public License as -% published by the Free Software Foundation; either version 2 of the -% License, or (at your option) any later version. See the file -% COPYING included with this distribution for more information. % % If wav file that is transcribed is generated from midi file (i.e. if % groundtruth exists) transcription is comapred to the original notes and @@ -22,6 +13,17 @@ % - FN - number of false negatives % - FP - number of false positives +% +% Centre for Digital Music, Queen Mary, University of London. +% This file copyright 2009 Ivan Damnjanovic. +% +% This program is free software; you can redistribute it and/or +% modify it under the terms of the GNU General Public License as +% published by the Free Software Foundation; either version 2 of the +% License, or (at your option) any later version. See the file +% COPYING included with this distribution for more information. +%% + timeOr=Problem.notesOriginal(:,5); noteOr=Problem.notesOriginal(:,3); timeTr=solver.reconstructed.notes(:,5); @@ -48,7 +50,12 @@ end AMT_res.tp_notes = [Problem.notesOriginal(Hits(:,1),[3 5]) solver.reconstructed.notes(Hits(:,2),[3 5])]; -AMT_res.oe_notes = [Problem.notesOriginal(OE(:,1),[3 5]) solver.reconstructed.notes(OE(:,2),[3 5])]; +if ~isempty(OE) + AMT_res.oe_notes = [Problem.notesOriginal(OE(:,1),[3 5]) solver.reconstructed.notes(OE(:,2),[3 5])]; +end +if isempty(OE) + OE=[0 0]; +end AMT_res.fn_notes_wo_oe = Problem.notesOriginal(setdiff([1:n],union(Hits(:,1),OE(:,1))),[3 5]); AMT_res.fp_notes_wo_oe = solver.reconstructed.notes(setdiff([1:m],union(Hits(:,2),OE(:,2))),[3 5]); AMT_res.TP=size(Hits,1);