comparison 2_generate_smith2013_ismir.m @ 6:e2337cd691b1 tip

Finishing writing the matlab code to replicate all observations made in the article. Added the article to the repository. Renamed the two main scripts ("1-get_mirex_estimates.rb" and "2-generate_smith2013_ismir.m") to not have dashes (since this was annoying within Matlab) Added new Michael Jackson figure.
author Jordan Smith <jordan.smith@eecs.qmul.ac.uk>
date Wed, 05 Mar 2014 01:02:26 +0000
parents
children
comparison
equal deleted inserted replaced
5:8d896eec680e 6:e2337cd691b1
1 % This is a script that reproduces the results of the following ISMIR paper:
2 %
3 % Smith, J. B. L., and E. Chew. 2013. A meta-analysis of the MIREX Structural
4 % Segmentation task. Proceedings of the International Society for Music
5 % Information Retrieval Conference. Curitiba, Brazil. 251–6.
6 %
7 % DO read the README.txt before running this file. Among other things, it will
8 % explain that you must download some data and place it in the correct file
9 % tree before this script will work.
10 %
11 % DO read the comments in this script before running it. You may want to run
12 % it piece by piece in order to understand exactly what it is doing.
13
14
15 %%
16 % STEP 0: Set up parameters.
17 % Name the MIREX datasets and algorithms desired.
18 dsets = {'mrx09','mrx10_1','mrx10_2','sal'};
19 algos = {'KSP1','KSP2','KSP3','MHRAF1','OYZS1','SBV1','SMGA1','SMGA2','SP1'};
20
21 % YOU MUST SET THE FOLLOWING PATH YOURSELF!
22 % Set it to be the same as the path given at the top of '1-get_mirex_estimates.rb'.
23 base_directory = '/Users/me/Desktop/MIREX_data';
24 base_directory = '/Users/jordan/Desktop/MIREX_data';
25
26
27 % You should get a copy of the evalution scripts in the Code.SoundSoftware
28 % repository. Wherever you put it, set the following path accordingly:
29 addpath('/Users/me/Desktop/whereiputmymatlabfiles/structural_analysis_evaluation')
30 addpath('/Users/jordan/Documents/structural_analysis_evaluation')
31
32 % You should also, clearly, add the current path (where this file is):
33 addpath('.')
34
35 % Check that we have access to the correct dependencies.
36
37 if exist('compare_structures.m')~=2,
38 fprintf('I could not locate ''compare_structures.m'', part of the Structural Analysis Evaluation project. Please read the help for this file before proceeding.\n')
39 end
40 if exist('load_annotation.m')~=2,
41 fprintf('I could not locate ''load_annotation.m'', part of the Structural Analysis Evaluation project. Please read the help for this file before proceeding.\n')
42 end
43 if exist('collect_all_mirex_annotations')~=2,
44 fprintf('I could not locate ''collect_all_mirex_annotations.m'', which should be in the same folder as this file. Something really screwed up has happened, clearly! Please read the help for this file before proceeding.\n')
45 end
46
47 %%
48 % STEP 1: Download data from MIREX website:
49 %
50 % - Ground truth files
51 % - Algorithm output
52 % - Reported evaluation results
53 % (See README.txt to see where to get this data.)
54
55
56 %%
57 % STEP 2: Import all this data into some Matlab structures.
58 %
59 % 1. Assemble MIREX ground truth file data in Matlab.
60 [mirex_truth mirex_dset_origin] = collect_all_mirex_annotations(base_directory, dsets, algos);
61 % 2. Assemble MIREX algorithm output data in Matlab.
62 mirex_output = collect_all_mirex_algo_output_data(base_directory, dsets, algos);
63 % 3. Assemble MIREX evaluation results in Matlab.
64 mirex_results = collect_all_mirex_results(base_directory, dsets, algos);
65 % 4. Download public repositories of annotations.
66 % NB: You must do this manually, as per the README.
67 % 5. Assemble public ground truth data in Matlab.
68 [public_truth public_dset_origin] = collect_all_public_annotations(base_directory);
69
70
71 %%
72 % STEP 3: Match MIREX and public data.
73 %
74 % With this information, we can now easily search for matches between
75 % MIREX and public ground truth.
76 [pub2mir, mir2pub, P] = match_mirex_to_public_data(mirex_truth, public_truth, mirex_dset_origin, public_dset_origin);
77 % If you have already done this, do not repeat this time-consuming step. Instead:
78 % load match_mirex_to_public_data_results
79
80 %%
81 % STEP 4: Compile datacubes
82 % 1. Compute extra evaluation measures using MIREX algorithm output.
83 % 2. Compute extra features of the annotations (song length, mean segment length, etc.).
84 % 3. Put it all together in a giant MEGADATACUBE.
85 [datacube newcube extracube indexing_info] = compile_datacubes(mirex_truth, ...
86 mirex_dset_origin, public_truth, mirex_output, mirex_results, mir2pub);
87 megadatacube = [datacube newcube extracube];
88 % If you have already done this, do not repeat this time-consuming step. Instead:
89 % load datacubes
90
91
92 %%
93 % Step 5: Do the statistics!
94 % 1. Compute correlations between all these parameters.
95 % 2. Display correlation figures.
96 % 3. Display analysis result figure.
97 do_correlation_analyses % this one is just a script because it does not return any values.
98
99 % You are now finished!