Mercurial > hg > aimc
diff experiments/scripts/cnbh-syllables/results_plotting/plot_all_results.m @ 165:f75123cf39ce
- Scripts for running recognition experiments using AIM-C and HTK to compare MFCCs against features generated with AIM-C
author | tomwalters |
---|---|
date | Wed, 04 Aug 2010 06:41:56 +0000 |
parents | ae195c41c7bd |
children | 97a513bc3bcf |
line wrap: on
line diff
--- a/experiments/scripts/cnbh-syllables/results_plotting/plot_all_results.m Thu Jul 22 19:03:51 2010 +0000 +++ b/experiments/scripts/cnbh-syllables/results_plotting/plot_all_results.m Wed Aug 04 06:41:56 2010 +0000 @@ -3,21 +3,16 @@ % Nick Fyson and Martin Vestergaard. % Copyright 2009 University of Cambridge % Author: Tom Walters <tcw24@cam> -function plot_all_results(exp_path, iteration, plot_end_numbers) - -plot_numbers = true; -if nargin < 3 - plot_end_numbers = false; -end +function plot_all_results(exp_path) % Load the results from the experimental directory -misclassified = load([exp_path 'misclassified_syllables_iteration_' num2str(iteration)]); +load([exp_path 'misclassified.txt_iter15']); % The total number of syllables in the CNBH syllable database num_points = 185; target_VTL = 15; -misclassified(:, 1) = 1 - misclassified(:, 1) / num_points; +misclassified(:, 1) = 1 - misclassified(:, 1) / num_points; %#ok<NODEF> % The individual data points are plotted as spheres sphere_size_x = 1.2; @@ -66,30 +61,20 @@ y_pos_2 = spokes{i}(j, 2); z_pos_2 = results{i}(j); - j=1; - - if (~plot_numbers && plot_end_numbers) - text(x_pos + 0.3*(x_pos - x_pos_2), y_pos + 0.3*(y_pos - y_pos_2), z_pos + 0.3*(z_pos - z_pos_2) , [num2str(results{i}(j), 3) '%']); + text(x_pos + 0.3*(x_pos - x_pos_2), y_pos + 0.3*(y_pos - y_pos_2), z_pos + 0.3*(z_pos - z_pos_2) , [num2str(results{i}(j), 3) '%']); + for j = 1:length(spokes{i}) + [X Y Z] = sphere(10); + X = sphere_size_x.*X + spokes{i}(j,1); + Y = sphere_size_y.*Y + spokes{i}(j,2); + Z = sphere_size_z.*Z + results{i}(j); + % C = zeros(size(X)); + plot3([spokes{i}(j, 1) spokes{i}(j, 1)], ... + [spokes{i}(j, 2),spokes{i}(j, 2)], [0 results{i}(j)], '-k.', ... + 'LineWidth', 1, 'Color', [0.8 0.8 0.8]); + surf(X, Y, Z, ones(size(Z)) .* (results{i}(j)), 'LineStyle', 'none'); end - for j = 1:length(spokes{i}) - if (plot_numbers) - text(spokes{i}(j,1), spokes{i}(j,2), results{i}(j), [num2str(results{i}(j), 3) '%']); - else - [X Y Z] = sphere(10); - X = sphere_size_x.*X + spokes{i}(j,1); - Y = sphere_size_y.*Y + spokes{i}(j,2); - Z = sphere_size_z.*Z + results{i}(j); - % C = zeros(size(X)); - plot3([spokes{i}(j, 1) spokes{i}(j, 1)], ... - [spokes{i}(j, 2),spokes{i}(j, 2)], [0 results{i}(j)], '-k.', ... - 'LineWidth', 1, 'Color', [0.8 0.8 0.8]); - surf(X, Y, Z, ones(size(Z)) .* (results{i}(j)), 'LineStyle', 'none'); - end - end - if (~plot_numbers) - plot3(spokes{i}(:,1), spokes{i}(:,2), results{i}(:), '-', 'LineWidth', 2, ... - 'Color', [0.2 0.2 0.2]); - end + plot3(spokes{i}(:,1), spokes{i}(:,2), results{i}(:), '-', 'LineWidth', 2, ... + 'Color', [0.2 0.2 0.2]); end % Plot a zero-sized sphere at zero to get the autoscaling of the colour bar % correct @@ -114,9 +99,8 @@ set(axes1, 'YDir', 'reverse'); set(axes1, 'ZTick', [0 20 40 60 80 100]); hold('all'); -%print('-depsc', [exp_path 'results_plot_iteration_' num2str(iteration) '.eps']); -% saveas(gcf, [exp_path 'results_plot_iteration_' num2str(iteration) '.fig']); -%!open results_plot.eps +print('-depsc', 'results_plot.eps'); +!open results_plot.eps