-
Notifications
You must be signed in to change notification settings - Fork 2
/
BssCompare.m
89 lines (72 loc) · 2.37 KB
/
BssCompare.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
%% Compare Bss
% clear
clc
% close all
NDatasets=9;
DatasetPath= '\New';
%% FastIca
BSSfunc = @fastica;
BssInArgs = {'verbose', 'off',...
'displayMode', 'off',...
'approach', 'symm',...
'g', 'tanh',...
'initGuess',};
BssOutArgs={'A', 'W'};
ResultsStruc1 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath);
ResultsStruc1.BSSfun='FastICA symm';
save('\Results\ResultsStruc1.mat','-struct','ResultsStruc1')
%% CCA
BSSfunc = @ccabss;
BssInArgs = {'W_init'};
BssOutArgs={'~','W'};
ResultsStruc2 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath);
ResultsStruc2.BSSfun='CCA';
save('\Results\ResultsStruc2.mat','-struct','ResultsStruc2')
%% InfoMax
BSSfunc = @runica;
BssInArgs = {'weights'};
BssOutArgs={'W','~'};
ResultsStruc3 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath);
ResultsStruc3.BSSfun='InfoMax';
save('\Results\ResultsStruc3.mat','-struct','ResultsStruc3')
%% JADE
% BSSfunc = @jadeR;
% BssInArgs = {};
% BssOutArgs={'W'};
%
% ResultsStruc5 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath,'PCA',true);
%% IVA
BSSfunc = @iva_second_orderOriginal;
BssInArgs = {'verbose',true,...
'opt_approach','quasi',...
'maxIter',5000,...
'WDiffStop',1e-6,...
'W_init'};
BssOutArgs={'W'};
ResultsStruc4 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath,...
'PCA',true,'Nshift',5,'Lag',4,'ExplainedVar',99.9,'ShiftDataset',true,'Filter',true);
ResultsStruc4.BSSfun='IVA Gauss';
save('\Results\ResultsStruc4.mat','-struct','ResultsStruc4')
%% FastIca
BSSfunc = @fastica;
BssInArgs = {'verbose', 'off',...
'displayMode', 'off',...
'approach', 'defl',...
'g', 'tanh',...
'initGuess'};
BssOutArgs={'A', 'W'};
ResultsStruc5 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath);
ResultsStruc5.BSSfun='FastICA defl';
save('\Results\ResultsStruc5.mat','-struct','ResultsStruc5')
%% IVA
BSSfunc = @iva_second_orderOriginal;
BssInArgs = {'verbose',false,...
'opt_approach','quasi',...
'maxIter',5000,...
'WDiffStop',1e-6,...
'W_init'};
BssOutArgs={'W'};
ResultsStruc6 = TestBSS(BSSfunc,BssInArgs,BssOutArgs,DatasetPath,...
'PCA',true,'Nshift',5,'Lag',4,'ExplainedVar',99.999,'ShiftDataset',true,'Filter',false);
ResultsStruc6.BSSfun='IVA Gauss no filter';
save('\Results\ResultsStruc6.mat','-struct','ResultsStruc6')