forked from andrewssobral/nway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setopts.m
75 lines (66 loc) · 1.92 KB
/
setopts.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
function Options=setopts(Model);
%SETOPTS
%
%Options=setopts(Model);
%
% Copyright (C) 1995-2006 Rasmus Bro & Claus Andersson
% Copenhagen University, DK-1958 Frederiksberg, Denmark, [email protected]
assgn=0;
if strcmp(upper(Model),'TUCKER'),
Options=zeros(9,3);
Options(1,1:2)=[1e-7 1e-8];
Options(2,1)=0;
Options(3,1)=1;
Options(4,1)=1;
Options(5,1)=1;
Options(6,1:2)=[1000 50];
Options(7,1:2)=[1 2];
Options(8,1)=0;
Options(9,1:2)=[1 1];
Options(10,1)=160;
save('noptions_t.mat','-v4','Options')
assgn=1;
end;
if strcmp(upper(Model),'PARAFAC'),
Options=zeros(9,3);
Options(1,1:2)=[1e-6 1e-6];
Options(2,1)=0;
Options(3,1)=1;
Options(4,1)=1;
Options(5,1)=5;
Options(6,1:2)=[1000 1000];
Options(7,1:2)=[1 2];
Options(8,1)=0;
Options(9,1:2)=[1 1];
Options(10,1)=60;
save('noptions_pf.mat','-v4','Options')
assgn=1;
end;
if ~assgn,
Options=zeros(9,3);
Options(1,1:2)=[1e-6 1e-6]; %Relative convergence criteria
Options(2,1)=0;
Options(3,1)=1;
Options(4,1)=1;
Options(5,1)=5;
Options(6,1:2)=[1000 1000]; %Max. number of inner and outer iterations.
Options(7,1:2)=[1 2];
Options(8,1)=0;
Options(9,1:2)=[1 1]; %Flags for amount of printout. 0=minimum, 1=medium, 2=full.
Options(10,1)=60; %Parameters for saving temporary results
fprintf('Identifier in ''Model'' not found, ''Options'' will be subdefault.\n')
end;
%---------------------------------------------
% Options definition's
%
% Options=zeros(9,7);
% Options(1,1:2)=[1e-6 1e-6]; %Relative convergence criteria
% Options(2,1)=0; %Initialization
% Options(3,1)=1; %
% Options(4,1)=1;
% Options(5,1)=5;
% Options(6,1:2)=[1000 1000]; %Max. number of inner and outer iterations.
% Options(7,1:2)=[1 2];
% Options(8,1)=0;
% Options(9,1:2)=[1 1]; %Flags for amount of printout. 0=minimum, 1=medium, 2=full.
% Options(10,1)=60; %Parameters for saving temporary results