Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Ex01_testPCA.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
% Principal component analysis
%Zahara Wang zahara.wang@emory.edu
%Principal component analysis
%
% BMI500 Course
% Lecture: An Introduction to Blind Source Separation and Independent Component Analysis
Expand Down Expand Up @@ -32,6 +33,9 @@
otherwise
error('unknown example');
end
x_demeaned = x - mean(x,2)*ones(1,size(x,2));
Cx = cov(x_demeaned');
[V, D] = eig(Cx, 'vector');

N = size(x, 1); % The number of channels
T = size(x, 2); % The number of samples per channel
Expand Down
9 changes: 9 additions & 0 deletions Ex02_testEigenAnalysisPowerMethod.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%Zahara Wang zahara.wang@emory.edu
% The power method for eigenvalue decomposition
%
% BMI500 Course
Expand All @@ -24,3 +25,11 @@
% Cx = x * x';
Cx = cov(x');

[V,D] = eig(Cx)

Itr = 100;

v0 = rand(N,1);
v1 = EigenAnalysisPowerMethod(Cx, v0, Itr);
scale1 = (Cx*v1) ./v1;
lambda1 = mean(scale1);
11 changes: 11 additions & 0 deletions Ex03_testICAmethods.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%Zahara Wang zahara.wang@emory.edu
% Independent component analysis using classical methods
%
% BMI500 Course
Expand Down Expand Up @@ -46,3 +47,13 @@
N = size(x, 1); % The number of channels
T = size(x, 2); % The number of samples per channel

approach = "symm";
g = "tanh";
lastEigfastica = N;
numOfIC = N;
interactivePCA = 'off';
[s_fastica, A_fastica, W_fastica] = fastica(x, 'approach', approach, ...
'g', g, 'lastEig', lastEigfastica, 'numOfIC', numOfIC, ...
'interactivePCA', interactivePCA);

Cs = cov(s_fastica');
1 change: 1 addition & 0 deletions Ex04_testEOGArtifactRemoval.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%Zahara Wang zahara.wang@emory.edu
% Removing EOG artifacts from EEG signals
%
% BMI500 Course
Expand Down
1 change: 1 addition & 0 deletions Ex05_testFetalECGExtraction.m
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
%Zahara Wang zahara.wang@emory.edu
% Extracting fetal ECG signals using various ICA algorithms
%
% BMI500 Course
Expand Down