summaryrefslogtreecommitdiff
path: root/graph.m
blob: 9817078f8c2760897b0a5f6d8655cd483bb8abf7 (plain)
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
47
48
tangocolors;
colormap(tangocolors_middle);

% optimization graph
percent = round(local_min_count / sum(local_min_count) * 100);
labels = {};
p = 0;

for i = 1:size(local_min_count, 2)
	if (p > 50)
		labels{i} = sprintf('%d%% %s', percent(i),pred_methods(i).name);
	else	
		labels{i} = sprintf('%s %d%%', pred_methods(i).name,percent(i));
	end
	p += percent(i);
end

pie(local_min_count, labels);
axis('off');
print('doc/image/opt_pred_pie.svg', '-dsvg', '-F:10');

% mean graph
plot(pred_list{1});
xlabel('Tage');
ylabel('Quantitaet');
print('doc/image/mean_pred.svg', '-dsvg', '-F:10');

% seven day plots
X = [0 0 7 7 14 14 21 21 28 28 35 35 42 42];
Y = [0 1 1 0  0  1  1  0  0  1  1  0  0  1];

%plot(X + 3, Y * 3800, '-k', 'linewidth', 1);
plot(sum(q'), '-ob;(Summe) Original;', 'linewidth', 2);
hold on;
ylim([0 4000]);
xlim([0 43]);
xlabel('Tage');
ylabel('Quantitaet');
% quantity sum
print('doc/image/q_sum.svg', '-dsvg', '-F:10')

plot(29:42, sum((pred_list{5})'), '-or;(Summe) Vorhersage;', 'linewidth', 2);
%ylim([0 4000]);
%xlim([0 14]);
%xlabel('Tage');
%ylabel('Quantitaet');
print('doc/image/sevenday_pred.svg', '-dsvg', '-F:10')
hold off;