Hi Igor.
Could you please say which version of sklearn you are using?
There was a minor change recently to improve consistency.
Now, the independent components of size [n_components, n_features are in
ICA.components_.
ICA.sources_ should contain the [n_samples, n_components] estimated
source signals for the data,
as it is described in the docs
<http://scikit-learn.org/dev/modules/generated/sklearn.decomposition.FastICA.html#sklearn.decomposition.FastICA>.
About the nans, I have no idea.
Have you tried to not do your own whitening, i.e. whiten=True?
Does it change the result at all (it shouldn't).
Cheers,
Andy
On 06/27/2012 10:50 PM, Igor Nikolskiy wrote:
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
------------------------------------------------------------------------------
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