[Mne_analysis] Twice ICA components differences

董群喜 dongqunxi at gmail.com
Thu Feb 27 04:35:02 EST 2014
Search archives:

Dear All,

When I used ICA twice continually, I got different amount of components. I
think it must be something wrong about my script.
Can anyone help me to check the script? By this script, I got amount of
components:

<ICA  |  raw data decomposition, fit: 13900 samples, 184 components>
<ICA  |  raw data decomposition, fit: 13900 samples, 167 components>

import mne
from mne.preprocessing import ICA
from mne.datasets import sample

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
n_components=0.99
max_pca_components=None

raw = mne.fiff.Raw(raw_fname, preload=True)
picks = mne.fiff.pick_types(raw.info, meg=True, exclude='bads')
ica = ICA(n_components=n_components, max_pca_components=max_pca_components,
               random_state=0)
ica.decompose_raw(raw, picks=picks, decim=3)
print ica
raw_new = ica.pick_sources_raw(raw)
picks = mne.fiff.pick_types(raw_new.info, meg=True, exclude='bads')
ica = ICA(n_components=n_components, max_pca_components=max_pca_components,
          random_state=0)
ica.decompose_raw(raw_new, picks=picks, decim=3)
print ica

Best wishes,
Qunxi Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140227/42fe415b/attachment.html 


More information about the Mne_analysis mailing list