-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain_figure_part4.m
46 lines (42 loc) · 1.57 KB
/
main_figure_part4.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
% num_DL_size_points=9;
% row_list = [551, 650; 826, 925; 1101, 1200];
model_list = ["singleonline","compositiononline", "reservoir_samplingonline", "singlejoint"];
%
% Rate_Data_Generator(1, num_DL_size_points, row_list, model_list)
% Rate_Data_Generator(2, num_DL_size_points, row_list, model_list)
% Rate_Data_Generator(3, num_DL_size_points, row_list, model_list)
%
%
% for k = 1:3
% load(sprintf('pred_rate_%d.mat', k-1))
% figure(k)
%
% plot(DL_size_array', DLrate(1, :), 'x-'); hold on;
% plot(DL_size_array', DLrate(2, :), 'o-'); hold on;
% plot(DL_size_array', DLrate(3, :), '.-'); hold on;
% plot(DL_size_array', DLrate(4, :), 's-'); hold on;
%
% plot(DL_size_array', OPTrateH(1, :), '--k'); hold on;
% plot(DL_size_array', OPTrateL(1, :), ':k'); hold on;
% legend('TL', 'Bilevel (Proposed)', 'Reservoir', 'Joint', 'Genie-Aided', 'Baseline')
% ylabel('Effective Achievable Rate (bps/Hz)')
% xlabel('Number of samples seen in data stream (k)')
% savefig(sprintf('fig_ep%d.fig', k-1))
% end
figure()
for k = 1:size(model_list, 2)
model =model_list(k);
loss2plot = zeros(9, 3);
time2plot = zeros(1, 9);
for p = 1:4
load(sprintf('save_%s_part%d.mat', model, p-1));
loss2plot = loss2plot + loss;
time2plot = time2plot + time;
end
plot(time2plot', mean(loss2plot,2), 'o--'); hold on;
end
grid on;
legend('TL', 'Bilevel (Proposed)', 'Reservoir', 'Joint')
ylabel('Mean Squared Error (MSE)')
xlabel('Cpu Time (sec.)')
savefig('fig_time.fig')