?? demo_kernel_ica.m
字號:
% demonstration script for the kernel-ica package
fprintf('Demonstration and test of the kernel-ica package\n');
N=1000; %number of training samples
m=3; %number of components
s=[];
for i=1:m
switch i
case 1, news=rand(1,N);
case 2, news=sin((1:N)/N*20);
case 3, news=exprnd(1,1,N);
end
news=news-mean(news); % centers data
news=news/std(news,1); % scales data
s=[s; news];
end
Wg=rand_orth(m);
x=Wg*s; % rotates data to generate mixtures
Wcca=kernel_ica(x,'contrast','kcca', ...
'sig',1,'kap',.01,'polish',1,'restarts',2);
sestimate=Wcca*x;
% plot results
for i=1:m
subplot(3,m,i)
plot(s(i,:))
title(sprintf('source %d',i));
axis off;
subplot(3,m,i+m)
plot(x(i,:))
title(sprintf('mixture %d',i));
axis off;
subplot(3,m,i+2*m)
plot(sestimate(i,:))
title(sprintf('estimated source %d',i));
axis off;
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -