-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFigure_4_a_b.m
46 lines (37 loc) · 1.35 KB
/
Figure_4_a_b.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%% Figure 4(a-b) - weekly final size predictions
% Run Extended_KF_long_term.m and Extended_KF_short_term.m
figure
hold on
plot(0:1:T-1,ones(T,1)*(1-x_true.S(end))*100,'b','LineWidth',2)
plot(0:1:T-1,mean(final_size_estimates(:,:))*100,'r','LineWidth',2)
plot(0:1:T-1,mean(final_size_estimates_behavior(:,:))*100,'k','LineWidth',2)
y2 = max(final_size_estimates_behavior(:,:))*100;
y1 = min(final_size_estimates_behavior(:,:))*100;
x = 0:1:T-1;
y = [y1; y2-y1]';
ha = area(x, y);
set(ha(1), 'FaceColor', 'none') % this makes the bottom area invisible
set(ha, 'LineStyle', 'none')
set(ha(2), 'FaceColor', [0.7 0.7 0.7])
plot(0:1:T-1,mean(final_size_estimates_behavior(:,:))*100,'k','LineWidth',2)
y2 = max(final_size_estimates(:,:))*100;
y1 = min(final_size_estimates(:,:))*100;
x = 0:1:T-1;
y = [y1; y2-y1]';
ha = area(x, y);
set(ha(1), 'FaceColor', 'none') % this makes the bottom area invisible
set(ha, 'LineStyle', 'none')
set(ha(2), 'FaceColor', [1.0 0.5 0.5])
plot(0:1:T-1,mean(final_size_estimates(:,:))*100,'r','LineWidth',2)
yyy = ylabel('Final Size Predictions');
set(gca,'FontSize',16);
xlabel('Weeks');
set(gca,'FontSize',16);
xlim([0 40])
ylim([5 40])
% ax = gca;
% ax.YTickLabel = {'5','10%','20%','30%', '40%'};
lll = legend('Ground truth','Model w/out behavior','Model w/behavior');
legend boxoff
set(lll,'Interpreter','Latex');
set(lll, 'FontSize',16);