[Mne_analysis] Finding the alternative to Matlab's runica inmne
Brunner, Clemens (email@example.com)
clemens.brunner at uni-graz.at
Fri Nov 10 01:52:10 EST 2017
If you don't want to reduce dimensionality via PCA, set n_components=None (note that ICA always performs PCA as the initial step, but then you can choose to discard PCA components or not).
The equivalent of EEGLAB's sphere and weights is ica.unmixing_matrix_ (in EEGLAB you have to multiply shpere with weights to obtain the unmixing matrix).
> On Nov 9, 2017, at 21:30, Igal Nazar <igal at brainster-tech.com> wrote:
> Hi all,
> I'm dealing with big issues trying to find an alternative to code running on Matlab using runica.m. Right now the code calls runica with the following parameters:
> 'lrate', 0.001
> 'extended', 1
> 'random_setting', 'default '
> Moreover, no pca is performed.
> The variables that interest me in the output of the function are: weights, sphere.
> In python - trying to follow these instruction (https://martinos.org/mne/stable/auto_tutorials/plot_artifacts_correction_ica.html just until the fitting step), that's what I did:
> n_components = 14 # if float, select n_components by explained variance of PCA
> method = 'extended-infomax' # for comparison with EEGLAB try "extended-infomax" here
> decim = 1 # we need sufficient statistics, not all time points -> saves time
> # we will also set state of the random number generator - ICA is a
> # non-deterministic algorithm, but we want to have the same decomposition
> # and the same order of components each time this tutorial is run
> random_state = 0
> # create an ICA instance called ica
> ica = mne.preprocessing.ICA(n_components=n_components, method=method, random_state=random_state, max_iter=512, max_pca_components=None)
> picks_eeg = mne.pick_types(raw.info, meg=False, eeg=True, eog=False,)
> ica.fit(raw, picks=picks_eeg, decim=decim)
> my questions are:
> • is it possible to run ICA without PCA in mne?
> • what is the equevialents of Matlab's variables: weights and sphere?
> Hope I'm clear enough,
> Igal Nazar
> R&D Engineer
> igal at brainster-tech.com
> + 972 52 6701713
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
More information about the Mne_analysis