-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathplot_tensorworkshop10.m
More file actions
69 lines (58 loc) · 1.88 KB
/
plot_tensorworkshop10.m
File metadata and controls
69 lines (58 loc) · 1.88 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
% PLOT_TENSORWORKSHOP10 - Plots figure for TKML workshop 2010
%
% Example
% load('result_compare5_new_50_50_20_7_8_9.mat')
% plot_tensorworkshop10
%
% See also
% exp_completion, tensorconst_adm, tensormix_adm
%
% Reference
% "Estimation of low-rank tensors via convex optimization"
% Ryota Tomioka, Kohei Hayashi, and Hisashi Kashima
% arXiv:1010.0789
% http://arxiv.org/abs/1010.0789
%
% "Statistical Performance of Convex Tensor Decomposition"
% Ryota Tomioka, Taiji Suzuki, Kohei Hayashi, Hisashi Kashima
% NIPS 2011
% http://books.nips.cc/papers/files/nips24/NIPS2011_0596.pdf
%
% Convex Tensor Decomposition via Structured Schatten Norm Regularization
% Ryota Tomioka, Taiji Suzuki
% NIPS 2013
% http://papers.nips.cc/paper/4985-convex-tensor-decomposition-via-structured-schatten-norm-regularization.pdf
%
% Copyright(c) 2010-2014 Ryota Tomioka
% This software is distributed under the MIT license. See license.txt
% load('result_compare5_50_50_20_7_8_9.mat')
nm = size(err,3);
if ~exist('tol','var')
tol=1e-3;
end
figure, h=errorbar_logsafe(trfrac'*ones(1,nm), shiftdim(mean(err)), shiftdim(std(err)));
set(gca,'fontsize',14,'yscale','log');
ylim([1e-5 1e+2]);
set(h,'linewidth',2);
set(h(1:3),'color',[0 0 1]);
set(h(1),'linestyle','--');
set(h(2),'linestyle','-.');
col=get(gca,'colororder');
for ii=4:length(h), set(h(ii),'color', col(ii-2,:)); end
hold on;
plot(xlim, tol*[1 1], '--', 'color', [.5 .5 .5], 'linewidth',2);
grid on;
xlabel('Fraction of observed elements');
ylabel('Generalization error');
legend('As a Matrix (mode 1)',...
'As a Matrix (mode 2)', ...
'As a Matrix (mode 3)',...
'Constraint',...
'Mixture',...
'Tucker (large)',...
'Tucker (exact)',...
'Optimization tolerance',...
'Location','NorthEastOutside');
h=get(gca,'children');
set(gca,'children',h([2:end,1]));
set(gcf,'PaperSize',[20 20]);