annotate experiments/scripts/cnbh-syllables/results_plotting/plot_all_hmm_param_results.m @ 626:586b0677aae8

Fourth revision of Alex Brandmeyer's C++ implementation. Fixed more style issues, changed AGC structures to vectors, replaced FloatArray2d with vector<FloatArray>, implemented first tests using GTest to verify coefficients and monaural output against Matlab values (stored in aimc/carfac/test_data/). To run tests, change the path stored in carfac_test.h in TEST_SRC_DIR. Added CARFAC_GenerateTestData to the Matlab branch, fixed stage indexing in CARFAC_Cross_Couple.m to reflect changes in AGCCoeffs and AGCState structs.
author alexbrandmeyer
date Wed, 22 May 2013 21:30:02 +0000
parents be3bbd8b3fcd
children
rev   line source
tomwalters@99 1 work_paths = {'nap_2/', 'mfcc/'};
tomwalters@99 2 %colors = jet(length(work_paths));
tomwalters@99 3 colors=[0 0 0; 1 0 0];
tomwalters@99 4 figure;
tomwalters@99 5
tomwalters@99 6 for type=1:length(work_paths)
tomwalters@99 7 work_path = work_paths{type};
tomwalters@99 8 %work_path = 'mfcc/';
tomwalters@99 9 nap_results = load([work_path 'final_results.txt']);
tomwalters@99 10
tomwalters@99 11 states_set = min(nap_results(:,1))+1:2:max(nap_results(:,1));
tomwalters@99 12 mix_set = min(nap_results(:,2))+1:2:max(nap_results(:,2));
tomwalters@99 13 total_lines = length(states_set) * length(mix_set);
tomwalters@99 14
tomwalters@99 15
tomwalters@99 16 line_names = cell(total_lines,1);
tomwalters@99 17 line_styles = {'-', '--', ':', '-.'};
tomwalters@99 18 marker_styles = {'+','o','*','.','x','s','d','^'};
tomwalters@99 19
tomwalters@99 20 %colors = jet(length(mix_set));
tomwalters@99 21
tomwalters@99 22 val = 1;
tomwalters@99 23 for states = states_set
tomwalters@99 24 line_style = line_styles{1 + mod(states, length(states_set))};
tomwalters@99 25
tomwalters@99 26 for components = mix_set
tomwalters@99 27 marker_style = marker_styles{1 + mod(components, length(mix_set))};
tomwalters@99 28 line_names{val,1} = [num2str(states) ' states ' num2str(components) ' components'];
tomwalters@99 29 nr = nap_results(nap_results(:,1) == states, :);
tomwalters@99 30 nr = nr(nr(:,2) == components, :);
tomwalters@99 31 nr = sortrows(nr,3);
tomwalters@99 32 plot(nr(:,3), nr(:,4), 'Color', colors(type, :), 'Linewidth', 1, 'LineStyle', line_style, 'Marker', marker_style);
tomwalters@99 33 hold on;
tomwalters@99 34 val = val + 1;
tomwalters@99 35 end
tomwalters@99 36 end
tomwalters@99 37
tomwalters@99 38 xlabel('Training Iterations');
tomwalters@99 39 ylabel('Percent Correct');
tomwalters@99 40 ylim([50 100]);
tomwalters@99 41 %ylim([86.9 93.3]);
tomwalters@99 42 xlim([4.5 15.5]);
tomwalters@99 43 set(gca, 'XTick', 5:15);
tomwalters@99 44 end
tomwalters@99 45 legend(line_names, 'Location', 'EastOutside');