# HG changeset patch # User Dimitrios Giannoulis # Date 1363175844 0 # Node ID 3ea8ed09af0fa0212c55cbd9e8b5b65b54cd6d58 # Parent 22b10c5b72e843d2a03e33be4a3fc39d92fc4223 additional clarifications diff -r 22b10c5b72e8 -r 3ea8ed09af0f README.txt --- a/README.txt Wed Mar 13 10:33:43 2013 +0000 +++ b/README.txt Wed Mar 13 11:57:24 2013 +0000 @@ -29,7 +29,11 @@ computed files for the method. They can be recomputed as follows. 1) Build Dictionaries. -Run functions "training.m" and "training_variant.m" to produce the dictionaries of Basis vectors. +Run functions "training.m" and "training_variant.m" to produce the dictionaries of +Basis vectors as follows: +training(numBases, ANOT_FLAG); +training_variant(ANOT_FLAG); + The 1st must be run for numBases: 5, 8, 10, 12, 15, 20 for ANOT_FLAG = 1 and 2. The 2nd for ANOT_FLAG = 1 and 2. numBases here is fixed to 20 (produces 20individual dictionary). @@ -46,6 +50,8 @@ 3) Obtain results in the form of matlab mat files for all devvelopment set scripts Run script "metrics_computation.m" for ANOT_FLAG = 1 and 2. +As is, the script outputs a cell with all the computed metrics for the 3 different evaluations: +Event Based, Class WIse Event Based and Frame Based. The script can be modified to create dfferent format of results and more information. Note that existing folders may include computed files. These may not necessarily be identical diff -r 22b10c5b72e8 -r 3ea8ed09af0f metrics_computation.m --- 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