Pregunta

I need to generate a matrix with a Gaussian distribution (with values spread mainly from -5 to 5), a Poisson matrix, mix them and give them as input to the Matlab FastICA.

I am a newbie on Matlab, distributions and ICA, so a few pointers would really help. I have been trying really hard but don't know whether I'm on the right track.

In order to generate the Gaussian and Poisson matrices, I generated two arrays:

s2 = poissrnd(2, 1, 40000); %Poisson distribution with lambda 2
s1 = rand(size(s2)) * 10 - 5; %Gaussian distribution and values ranging from -5 to 5

I then use the reshape function to generate two 200x200 matrices. When using image, I get the following images:

enter image description here

My 1st question is this: Is this the correct way to generate Gaussian and Poisson matrices in Matlab? Or are there some built-in functions which actually generate the matrices, instead of having to generate and reshape arrays?

Now, the 2nd problem: using FastICA.

Referring to a very good answer at: ICA (Independent Component Analysis) fast-fixed point algorithm, it mentions that FastICA needs each signal in a row.

I am therefore generating my signal matrix by:

S(1,:) = s1; %row 1
S(2,:) = s2; %row 2

I then generate a mixing matrix, add some noise, and give the resultant matrix as input to the fastica() function.

My question is: is it possible to give 2D data directly to FastICA? What if you have an image with many mixed signals and want to give it to ICA so that it can find the Independent Components?

A link to a tutorial explaining how to use FastICA on different inputs would be very helpful.

Thanks in advance to anyone who reads this post and tries to help. And sorry for the lengthy question, I wanted to make sure that it is well understood!

¿Fue útil?

Solución

How do you create you mixed signal? FastICA will try to estimate the matrix you used for mixing (the original components). As long as you have a sufficient number of measurements for your observations (signals) FastICA can unmix any number of mixed signals. See, in the answer you linked to, four signals are being mixed and decomposed.

The data you put into FastICA already is 2D (m x n), just shaped to another size (1 x mn).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top