Skip to content

Commit

Permalink
version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xinychen committed Sep 8, 2018
1 parent d4a6c47 commit 8b029d0
Show file tree
Hide file tree
Showing 18 changed files with 205 additions and 0 deletions.
Binary file added curves/mu10.mat
Binary file not shown.
39 changes: 39 additions & 0 deletions curves/mu_curve10.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
% Load data "mu10.mat".
load mu10;

% Create a figure.
figure('DefaultAxesFontSize',16);
ax = gca;

% Plot the mu curves.
xbound = [1,1,1:500,500,500,fliplr(1:500)];
ybound = [mean(mu(:,1))+std(mu(:,1)),mean(mu(:,1))-std(mu(:,1)),mean(mu)-std(mu),...
mean(mu(:,end))-std(mu(:,end)),mean(mu(:,end))+std(mu(:,end)),fliplr(mean(mu)+std(mu))];
hold on;
plot(mu','-','Color',[0.76,0.87,0.78]);
hold on;
s = fill(xbound,ybound,'y','EdgeColor','white');
alpha(s,0.20);
hold on;
h = plot(mean(mu),'Color','r','LineWidth',2);
hold on;
p = plot(39.01*ones(500,1),'-.','Color','magenta','LineWidth',2);

% Change settings and items.
box on;
grid on;
ax.XTick = [0,50,100,200,500];
ax.XTickLabel = [0,50,100,200,500];
ylim([38,40.5]);
ax.YTick = [38,38.5,38.75,39,39.25,39.50,39.75,40.5];
ax.YTickLabel = ['38.00';'38.50';'38.75';'39.00';'39.25';'39.50';'39.75';'40.50'];
ax.GridLineStyle = '-.';
xlabel('Iteration');
ylabel('Speed (km/h)');
legend([p,h],{'Mean of Observations', 'Model Parameter \mu'});

% Save the figure as "mu_curve10.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'mu_curve10','pdf');
Binary file added curves/mu_curve10.pdf
Binary file not shown.
Binary file added heat-maps/bias10.mat
Binary file not shown.
Binary file added heat-maps/bias20.mat
Binary file not shown.
Binary file added heat-maps/bias60.mat
Binary file not shown.
26 changes: 26 additions & 0 deletions heat-maps/heat_map10.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
% Load data "bias10.mat".
load bias10;

% Create a figure.
figure('DefaultAxesFontSize',16);
ax = gca;

% Create a heatmap.
mat = bias{2}.*ones(61,144)+bias{3}'.*ones(61,144);
imagesc(mat);
c = colorbar;
colormap hot;
ylabel(c,'Speed (km/h)');
ax.XTick = [1,13,25,37,49,61,73,85,97,109,121,133,144];
ax.XTickLabel = ['00:00';'02:00';'04:00';'06:00';'08:00';'10:00';'12:00';...
'14:00';'16:00';'18:00';'20:00';'22:00';'23:50'];
xtickangle(45);
ax.YTick = [1,6,11,16,21,26,31,36,41,46,51,56,61];
ax.YTickLabel = ['08-01';'08-06';'08-11';'08-16';'08-21';'08-26';'08-31';...
'09-05';'09-10';'09-15';'09-20';'09-25';'09-30'];

% Save the figure as "heat_map10.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'heat_map10','pdf');
Binary file added heat-maps/heat_map10.pdf
Binary file not shown.
28 changes: 28 additions & 0 deletions heat-maps/heat_map20.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
% Load data "bias20.mat".
clc;
clear;
load bias20;

% Create a figure.
figure('DefaultAxesFontSize',16);
ax = gca;

% Create a heatmap.
mat = bias{2}.*ones(61,144)+bias{3}'.*ones(61,144);
imagesc(mat);
c = colorbar;
colormap hot;
ylabel(c,'Speed (km/h)');
ax.XTick = [1,13,25,37,49,61,73,85,97,109,121,133,144];
ax.XTickLabel = ['00:00';'02:00';'04:00';'06:00';'08:00';'10:00';'12:00';...
'14:00';'16:00';'18:00';'20:00';'22:00';'23:50'];
xtickangle(45);
ax.YTick = [1,6,11,16,21,26,31,36,41,46,51,56,61];
ax.YTickLabel = ['08-01';'08-06';'08-11';'08-16';'08-21';'08-26';'08-31';...
'09-05';'09-10';'09-15';'09-20';'09-25';'09-30'];

% Save the figure as "heat_map20.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'heat_map20','pdf');
Binary file added heat-maps/heat_map20.pdf
Binary file not shown.
28 changes: 28 additions & 0 deletions heat-maps/heat_map60.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
% Load data "bias60.mat".
clc;
clear;
load bias60;

% Create a figure.
figure('DefaultAxesFontSize',16);
ax = gca;

% Create a heatmap.
mat = bias{2}.*ones(61,144)+bias{3}'.*ones(61,144);
imagesc(mat);
c = colorbar;
colormap hot;
ylabel(c,'Speed (km/h)');
ax.XTick = [1,13,25,37,49,61,73,85,97,109,121,133,144];
ax.XTickLabel = ['00:00';'02:00';'04:00';'06:00';'08:00';'10:00';'12:00';...
'14:00';'16:00';'18:00';'20:00';'22:00';'23:50'];
xtickangle(45);
ax.YTick = [1,6,11,16,21,26,31,36,41,46,51,56,61];
ax.YTickLabel = ['08-01';'08-06';'08-11';'08-16';'08-21';'08-26';'08-31';...
'09-05';'09-10';'09-15';'09-20';'09-25';'09-30'];

% Save the figure as "heat_map60.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'heat_map60','pdf');
Binary file added heat-maps/heat_map60.pdf
Binary file not shown.
Binary file added rmse-curves/rmse.mat
Binary file not shown.
Binary file added rmse-curves/rmse10.mat
Binary file not shown.
Binary file added rmse-curves/rmse_curve.pdf
Binary file not shown.
38 changes: 38 additions & 0 deletions rmse-curves/rmse_curve10.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
load rmse10;

% Set colors.
color = [55,126,184]/255;

% Create a figure.
figure('DefaultAxesFontSize',16);
ax = gca;

% Plot the RMSE curves.
xbound = [1,1,1:500,500,500,fliplr(1:500)];
ybound = [max(rmse10(:,1)),min(rmse10(:,1)),min(rmse10),min(rmse10(:,end)),max(rmse10(:,end)),fliplr(max(rmse10))];
hold on;
plot(rmse10');
hold on;
s = fill(xbound,ybound,'y','EdgeColor',color,'linewidth',1);
alpha(s,0.1);
hold on;
h = plot(mean(rmse10),'color','r','linewidth',3,'DisplayName','method #2');

% Change settings and items.
box on;
grid on;
ax.XTick = [0,50,100,200,500];
ax.XTickLabel = [0,50,100,200,500];
ylim([4.10,4.40]);
ax.YTick = [4.10,4.12,4.14,4.16,4.18,4.20,4.25,4.40];
ax.YTickLabel = ['4.10';'4.12';'4.14';'4.16';'4.18';'4.20';'4.25';'4.40'];
ax.GridLineStyle = '-.';
xlabel('Iteration');
ylabel('RMSE (km/h)');
legend([h,s],{'Averaged Curve';'Curves Boundary'});

% Save the figure as "rmse_curve10.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'rmse_curve10','pdf');
Binary file added rmse-curves/rmse_curve10.pdf
Binary file not shown.
46 changes: 46 additions & 0 deletions rmse-curves/rmse_curves.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
% Load data "rmse.mat".
load rmse;

% Set colors.
color1 = [55,126,184]/255;
color2 = [1,0.6,0.78];
color3 = [255,0,255]/255;

% Create a figure.
figure('DefaultAxesFontSize',14);
ax = gca;

% Plot the first RMSE curve.
xbound = [1,1,1:200,200,200,fliplr(1:200)];
ybound = [max(rmse{1}(:,1)),min(rmse{1}(:,1)),min(rmse{1}),min(rmse{1}(:,end)),max(rmse{1}(:,end)),fliplr(max(rmse{1}))];
s = fill(xbound,ybound,'y','EdgeColor',color1,'linewidth',0.5);
alpha(s,0.1);
hold on;
h1 = plot(mean(rmse{1}),'color','r','linewidth',2,'DisplayName','method #1');

% Plot the second RMSE curve.
xbound = [1,1,1:200,200,200,fliplr(1:200)];
ybound = [max(rmse{2}(:,1)),min(rmse{2}(:,1)),min(rmse{2}),min(rmse{2}(:,end)),max(rmse{2}(:,end)),fliplr(max(rmse{2}))];
hold on;
s = fill(xbound,ybound,color2,'EdgeColor',color1,'linewidth',0.5);
alpha(s,0.1);
hold on;
h2 = plot(mean(rmse{2}),'color',color3,'linewidth',2,'DisplayName','method #2');

% Change settings and items.
grid on;
ax.XTick = [0,25,50,100,200];
ax.XTickLabel = [0,25,50,100,200];
ylim([3.95,4.15]);
ax.YTick = [3.97,3.98,3.99,4.01,4.02,4.03,4.15];
ax.YTickLabel = [3.97,3.98,3.99,4.01,4.02,4.03,4.15];
ax.GridLineStyle = '-.';
xlabel('Iteration');
ylabel('RMSE (km/h)');
legend([h1,h2],{'method #1','method #2'});

% Save a figure in a format of "rmse_curve.pdf".
set(gcf, 'PaperSize', [6 4.5]);
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperPosition', [0 0 6 4.5]);
saveas(gcf,'rmse_curve','pdf');

0 comments on commit 8b029d0

Please sign in to comment.