绪论
独立成分分析ICA是一个在多领域被应用的基础算法。ICA是一个不定问题,没有确定解,所以存在各种不同先验假定下的求解算法。相比其他技术,ICA的开源代码不是很多,且存在黑魔法–有些步骤并没有在论文里提到,但没有这些步骤是无法得到正确结果的。
ICA原理
就是源信号加权混合后通过ICA分离
clear;clc;close all;
% ts=0.005
% t=np.arange(0,1,ts)
% s1=np.sin(2*np.pi*10*t);s2=np.sin(2*np.pi*20*t);s2=np.array(20 * (5 * [2] + 5 * [-2]));a9mysubplot.mysubplot([s1,s2])
% s=0.5*s1+0.5*s2;a9myplot.myplot(s)
ts=0.005;
t=0:0.005:1;
s1=sin(2*pi*10*t);
s2=square(2*pi*20*t,50);
% plot(s2);
% figure(1);subplot(211);plot(s1);subplot(212);plot(s2);
subplot(3,2,1),plot(s1),title('输入信号1');
subplot(3,2,2),plot(s2),title('输入信号2');
S=[s1;s2];
% s=0.5*s1+0.5*s2;S=[s;s];
Sweight = rand(size