annotate 2-generate_smith2013_ismir.m @ 1:818a4b5f3384

Initial version, includes all files Deleted previous stuff which was junk
author Jordan Smith <jordan.smith@eecs.qmul.ac.uk>
date Fri, 20 Sep 2013 16:36:45 +0100
parents
children 624231da830b
rev   line source
jordan@1 1 % This is a script that reproduces the results of the following ISMIR paper:
jordan@1 2 %
jordan@1 3 % Smith, J. B. L., and E. Chew. 2013. A meta-analysis of the MIREX Structural
jordan@1 4 % Segmentation task. Proceedings of the International Society for Music
jordan@1 5 % Information Retrieval Conference. Curitiba, Brazil. 251–6.
jordan@1 6 %
jordan@1 7 % DO read the README.txt before running this file. Among other things, it will
jordan@1 8 % explain that you must download some data and place it in the correct file
jordan@1 9 % tree before this script will work.
jordan@1 10 %
jordan@1 11 % DO read the comments in this script before running it. You may want to run
jordan@1 12 % it piece by piece in order to understand exactly what it is doing.
jordan@1 13
jordan@1 14
jordan@1 15 %%
jordan@1 16 % STEP 0: Set up parameters.
jordan@1 17 % Name the MIREX datasets and algorithms desired.
jordan@1 18 dsets = {'mrx09','mrx10_1','mrx10_2','sal'};
jordan@1 19 algos = {'KSP1','KSP2','KSP3','MHRAF1','OYZS1','SBV1','SMGA1','SMGA2','SP1'};
jordan@1 20 base_directory = '/Users/jordan/Documents/classes/mirex_data/2012';
jordan@1 21 base_directory = '/Users/jordan/Desktop/MIREX_data';
jordan@1 22 % You should get a copy of the evalution scripts in the Code.SoundSoftware
jordan@1 23 % repository. Again, please see the README...
jordan@1 24 addpath('/Users/jordan/Documents/structural_analysis_evaluation')
jordan@1 25
jordan@1 26
jordan@1 27 %%
jordan@1 28 % STEP 1: Download data from MIREX website:
jordan@1 29 %
jordan@1 30 % - Ground truth files
jordan@1 31 % - Algorithm output
jordan@1 32 % - Reported evaluation results
jordan@1 33 % (See README.txt to see where to get this data.)
jordan@1 34
jordan@1 35
jordan@1 36 %%
jordan@1 37 % STEP 2: Import all this data into some Matlab structures.
jordan@1 38 %
jordan@1 39 % 1. Assemble MIREX ground truth file data in Matlab.
jordan@1 40 [mirex_truth mirex_dset_origin] = collect_all_mirex_annotations(base_directory, dsets, algos);
jordan@1 41 % 2. Assemble MIREX algorithm output data in Matlab.
jordan@1 42 mirex_output = collect_all_mirex_algo_output_data(base_directory, dsets, algos);
jordan@1 43 % 3. Assemble MIREX evaluation results in Matlab.
jordan@1 44 mirex_results = collect_all_mirex_results(base_directory, dsets, algos);
jordan@1 45 % 4. Download public repositories of annotations.
jordan@1 46 % NB: You must do this manually, as per the README.
jordan@1 47 % 5. Assemble public ground truth data in Matlab.
jordan@1 48 [public_truth public_dset_origin] = collect_all_public_annotations(base_directory);
jordan@1 49
jordan@1 50
jordan@1 51 %%
jordan@1 52 % STEP 3: Match MIREX and public data.
jordan@1 53 %
jordan@1 54 % With this information, we can now easily search for matches between
jordan@1 55 % MIREX and public ground truth.
jordan@1 56 [pub2mir, mir2pub, P] = match_mirex_to_public_data(mirex_truth, public_truth, mirex_dset_origin, public_dset_origin);
jordan@1 57 % If you have already done this, do not repeat this time-consuming step. Instead:
jordan@1 58 % load match_mirex_to_public_data_results
jordan@1 59
jordan@1 60 %%
jordan@1 61 % STEP 4: Compile datacubes
jordan@1 62 % 1. Compute extra evaluation measures using MIREX algorithm output.
jordan@1 63 % 2. Compute extra features of the annotations (song length, mean segment length, etc.).
jordan@1 64 % 3. Put it all together in a giant MEGADATACUBE.
jordan@1 65 [datacube newcube extracube indexing_info] = compile_datacubes(mirex_truth, ...
jordan@1 66 mirex_dset_origin, public_truth, mirex_output, mirex_results, mir2pub);
jordan@1 67 % If you have already done this, do not repeat this time-consuming step. Instead:
jordan@1 68 % load datacubes
jordan@1 69 megadatacube = [datacube newcube extracube];
jordan@1 70
jordan@1 71
jordan@1 72 %%
jordan@1 73 % Step 5: Do the statistics!
jordan@1 74 % 1. Compute correlations between all these parameters.
jordan@1 75 % 2. Display correlation figures.
jordan@1 76 % 3. Display analysis result figure.
jordan@1 77 do_correlation_analyses % this one is just a script because it does not return any values.
jordan@1 78
jordan@1 79 % You are now finished!