Skip to content

Commit

Permalink
final updates
Browse files Browse the repository at this point in the history
  • Loading branch information
erolcanun committed Jun 6, 2013
1 parent d5be1b2 commit 32a469a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
Binary file modified plots/most_errored_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/multi_h1h2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified plots/multi_numu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/mlp_multi.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
w_3, b_3);

% Calculates squared error for the predicted class labels
sq_error_test = sqrerr(encoder(T_test)', a_3);
sq_error_test = squared_error(encoder(T_test)', a_3);

% zero-one error
[~,c] = max(a_3,[],1); % find index of maximum among each sample output
Expand Down
6 changes: 2 additions & 4 deletions src/plotter.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function plotter(tr_err, val_err, zerone_err, ec)

if(ec == 1) % initialize graph object in first trial
close all
h = figure(1);
figure(1)
plot(ec,tr_err(ec),'*r');
hold on
plot(ec,val_err(ec),'*g');
Expand All @@ -19,16 +19,14 @@ function plotter(tr_err, val_err, zerone_err, ec)
xlabel('Epoch #');
ylabel('Error Value');
else
h = figure(1);
figure(1)
plot(ec,tr_err(ec),'*r');
hold on
plot(ec,val_err(ec),'*g');
hold on
plot(ec,zerone_err(ec),'*k');
end

% set font size to larger one
set(findall(h, 'type', 'text'), 'fontSize', 18)
xlim([0 ec+1]);
%ylim([0 1.1]); % upper-limit is random and can be changed later
hold on
7 changes: 2 additions & 5 deletions src/plotter_multi.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function plotter_multi(tr_err1, tr_err2, tr_err3, val_err1, val_err2, val_err3,
% zero_one_err_i: vector of zero-one errors for each epoch for trial i

close all
h = figure(1);
figure(1)
semilogy(tr_err1,'-r');
hold on
semilogy(val_err1,'--r');
Expand All @@ -28,7 +28,4 @@ function plotter_multi(tr_err1, tr_err2, tr_err3, val_err1, val_err2, val_err3,
legend('Training 1','Validation 1','Zero-One 1','Training 2','Validation 2','Zero-One 2','Training 3','Validation 3','Zero-One 3');
title('Training, Validation and Zero-One Errors for MLP Training');
xlabel('Epoch #');
ylabel('Error Value');

% set font size to larger one
set(findall(h, 'type', 'text'), 'fontSize', 18)
ylabel('Error Value');

0 comments on commit 32a469a

Please sign in to comment.