Hello all,

I've got a FastICA question. I am interested in doing my own whitening of
the data before feeding it to fastICA, but I'm running into trouble. Here's
the code:

from pylab import *
from pandas import *
from sklearn.decomposition import FastICA, PCA

ms2= read_csv('L-Glu.csv', index_col= 0)
ms2_centered= ms2-ms2.mean()
ms2_whitened= PCA().fit(ms2_centered.T).transform(ms2_centered.T)

ica= FastICA(n_components= 2, whiten= False)
fit= ica.fit(ms2_whitened)
sources= abs(ica.transform(ms2_whitened))

The ms2_whitened matrix looks good - it is the right shape, and looks
reasonable with imshow. The problem is when I look at fit.sources_ there
are more than 2 sources and all of the source values are nan.

Does anyone know what I could be doing wrong?

Thanks in advance,

Igor
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to