summaryrefslogtreecommitdiff
path: root/graph.m
blob: b66df7880c82eeca7c31c499d0a9b578dfc37bc9 (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
49
50
51
52
53
54
55
56
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');
xlim([1 14]);
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;

%% for product 335
%plot(q(:,335), '-ob', 'linewidth', 2);
%hold on;
%plot(p(:,335), '-or', 'linewidth', 2);
%hold off;
%print('doc/image/prod_335.svg', '-dsvg', '-F:10');