⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demo_kernel_ica.m

📁 The kernel-ica package is a Matlab program that implements the Kernel ICA algorithm for independent
💻 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 + -