-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSetBaseParams.m
51 lines (32 loc) · 1.06 KB
/
SetBaseParams.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
% sets default parameters and saves them in a .mat file.
% Scripts starting with "Experiment" load this .mat file and optionally change some parameters.
% Then they call BaseExperiment.m
decompfn = @(X, R, D, tau, init, nD) cp_sparse(X, R, D, tau, init, nD);
time = 0:1:128;
dictfn = @(numModes) SinCosWindowedDict(numModes, time);
datafn = @() VideoExampleData(0,0);
initfnA = @(n, m) rand(n, m);
initfnB = @(n, m) rand(n, m);
initfnZ = @(n, m) rand(n, m);
noisefn = @(X) X;
%strength = .5;
%noisefn = @(X) WhiteGaussian(X, strength);
numModes = 50000;
Zthresholdfn = @(Zhat) Zhat;
%Zthresholdfn = @(Zhat) OnlyOneD(Zhat);
max_iter = 3;
lowtau = .005;
hightau = 2;
perturbAfn = @(Ahat) Ahat + 0.001*ones(size(Ahat));
perturbBfn = @(Bhat) Bhat + 0.001*ones(size(Bhat));
perturbZfn = @(Zhat) Zhat;
expnum = 1;
lenSqn = 20;
slopeThreshold = .1;
diffThreshold = 10^(-2);
svTol = .995;
numTrials = 5;
errors = zeros(numTrials, 1);
corrs = zeros(numTrials, 1);
sparsities = zeros(numTrials, 1);
save('BaseParams.mat')