【发布时间】:2017-09-11 06:53:03
【问题描述】:
我正在尝试实现 FastICA(独立分量分析)来实现图像的盲信号分离,但首先我想我应该看看 Github 上的一些产生良好结果的示例。我正在尝试从Wikipedia's FastICA 上的算法步骤比较主循环,但我很难看出它们实际上是如何相同的。
它们看起来非常相似,但有一些我不明白的区别。看起来这个实现类似于(或相同)来自 Wiki 的“多组件提取”版本。
有人能帮我理解一下与非线性函数及其一阶和二阶导数有关的四行左右的内容,以及更新权重向量的第一行吗?非常感谢任何帮助!
以下是更改变量以更接近地反映 Wiki 的实现:
% X is sized (NxM, 3x50K) mixed image data matrix (one row for each mixed image)
C=3; % number of components to separate
W=zeros(numofIC,VariableNum); % weights matrix
for p=1:C
% initialize random weight vector of length N
wp = rand(C,1);
wp = wp / norm(wp);
% like do:
i = 1;
maxIterations = 100;
while i <= maxIterations+1
% until mat iterations
if i == maxIterations
fprintf('No convergence: ', p,maxIterations);
break;
end
wp_old = wp;
% this is the main part of the algorithm and where
% I'm confused about the particular implementation
u = 1;
t = X'*b;
g = t.^3;
dg = 3*t.^2;
wp = ((1-u)*t'*g*wp+u*X*g)/M-mean(dg)*wp;
% 2nd and 3rd wp update steps make sense to me
wp = wp-W*W'*wp;
wp = wp / norm(wp);
% or until w_p converges
if abs(abs(b'*bOld)-1)<1e-10
W(:,p)=b;
break;
end
i=i+1;
end
end
以及快速参考的 Wiki 算法:
【问题讨论】:
-
好吧,在我打开这个赏金之后,我发现了我的误解:/ 如果你想要一些积分,请继续回答。
标签: algorithm matlab image-processing machine-learning feature-detection