diff metrics_computation.m @ 1:3ea8ed09af0f tip

additional clarifications
author Dimitrios Giannoulis
date Wed, 13 Mar 2013 11:57:24 +0000
parents 22b10c5b72e8
children
line wrap: on
line diff
--- a/metrics_computation.m	Wed Mar 13 10:33:43 2013 +0000
+++ b/metrics_computation.m	Wed Mar 13 11:57:24 2013 +0000
@@ -110,6 +110,7 @@
 load(['results' Annotators{ANOT_FLAG} '/results03.mat']) 
 r3 = results;
 
+% Calculate mean F-measure values for all development set audio files:
 Fmeasure_EB = []; Fmeasure_CWEB = []; Fmeasure_FB = [];
 for i=1:size(results,1)
 Fmeasure_EB(i)=(r1{i,1}.F+r2{i,1}.F+r3{i,1}.F)/3;
@@ -117,16 +118,19 @@
 Fmeasure_FB(i)=(r1{i,3}.F+r2{i,3}.F+r3{i,3}.F)/3;
 end
 
+% Choose the combination of system parameters that maximizes each metric
 [valEB, posEB] = max(Fmeasure_EB);
 [valCWEB, posCWEB] = max(Fmeasure_CWEB);
 [valFB, posFB] = max(Fmeasure_FB);
 
+% Collect the names of the system versions that produced the maximum F-measure 
+% for each metric
 res = {results{posEB,1}.name; valEB; results{posCWEB,2}.name; valCWEB ...
     ;results{posFB,3}.name; valFB};
 
 % THE FOLLOWING COMPUTES ALL THE METRICS FOR EACH EVAL CASE AND THE OPTIMAL
 % PARAMETERS
-'EB'
+% Event Based 'EB'
 all_res_EB = {(r1{posEB,1}.Rec+r2{posEB,1}.Rec+r3{posEB,1}.Rec)/3;
               (r1{posEB,1}.Pre+r2{posEB,1}.Pre+r3{posEB,1}.Pre)/3;
               (r1{posEB,1}.F+r2{posEB,1}.F+r3{posEB,1}.F)/3;
@@ -135,7 +139,7 @@
               (r1{posEB,1}.PreOff+r2{posEB,1}.PreOff+r3{posEB,1}.PreOff)/3;
               (r1{posEB,1}.FOff+r2{posEB,1}.FOff+r3{posEB,1}.FOff)/3;
               (r1{posEB,1}.AEEROff+r2{posEB,1}.AEEROff+r3{posEB,1}.AEEROff)/3};
-'CWEB'
+% Class-wise Event Based 'CWEB'
 all_res_CWEB = {(r1{posCWEB,2}.Rec+r2{posCWEB,2}.Rec+r3{posCWEB,2}.Rec)/3;
               (r1{posCWEB,2}.Pre+r2{posCWEB,2}.Pre+r3{posCWEB,2}.Pre)/3;
               (r1{posCWEB,2}.F+r2{posCWEB,2}.F+r3{posCWEB,2}.F)/3;
@@ -144,13 +148,22 @@
               (r1{posCWEB,2}.PreOff+r2{posCWEB,2}.PreOff+r3{posCWEB,2}.PreOff)/3;
               (r1{posCWEB,2}.FOff+r2{posCWEB,2}.FOff+r3{posCWEB,2}.FOff)/3;
               (r1{posCWEB,2}.AEEROff+r2{posCWEB,2}.AEEROff+r3{posCWEB,2}.AEEROff)/3};
-'FB'
+% Frame Based 'FB'
 all_res_FB = {(r1{posFB,3}.Rec+r2{posFB,3}.Rec+r3{posFB,3}.Rec)/3;
               (r1{posFB,3}.Pre+r2{posFB,3}.Pre+r3{posFB,3}.Pre)/3;
               (r1{posFB,3}.F+r2{posFB,3}.F+r3{posFB,3}.F)/3;
               (r1{posFB,3}.AEER+r2{posFB,3}.AEER+r3{posFB,3}.AEER)/3;
-              NaN;
-              NaN;
-              NaN;
-              NaN;};
-ALL_METRICS = [all_res_EB, all_res_CWEB, all_res_FB]          
\ No newline at end of file
+              '-';
+              '-';
+              '-';
+              '-';};
+          
+COMP_METRICS = [{'Rec';'Pre';'F';'AEER';'RecOff';'PreOff';'FOff';'AEEROff'},all_res_EB, all_res_CWEB, all_res_FB]; 
+
+disp('Computed metrics for the Event Based (EB) [column 2],')
+disp('the Class-wise Event Based (CWEB) [column 3],')
+disp('and the Frame Based (FB) [column 4]')
+disp(COMP_METRICS)
+
+% system version names
+% disp(res)
\ No newline at end of file