[Mne_analysis] ICA failing to exclude bad channels {Disarmed}

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Tue May 30 12:52:15 EDT 2017
Search archives:

Dear Lyam,

it's always possible there is a bug. Please share a script and maybe data if
it's not on sample data so we can replicate and investigate.

Alex

On Tue, May 30, 2017 at 6:45 PM, Lyam Bailey <Lyam.Bailey at dal.ca> wrote:

> Dear all,
>
>
> Thanks for the responses. To clarify, I'm excluding bad channels based on
> visual inspection of the raw data, and defining them manually with
> raw.info['bads'] = []. If it helps, I can confirm that MNE is registering
> this step, as print raw.info['bads'] lists all the specified channels, as
> one would expect.
>
>
> Regards
>
> Lyam
>
> ---------------------------------------------------------
>
> Lyam Bailey, BSc.
>
> Graduate Student
> Department of Psychology & Neuroscience
> Dalhousie University
>
> ------------------------------
> *From:* mne_analysis-bounces at nmr.mgh.harvard.edu <
> mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Phillip Alday <
> Phillip.Alday at unisa.edu.au>
> *Sent:* Tuesday, May 30, 2017 10:35:55 AM
> *To:* mne_analysis at nmr.mgh.harvard.edu
> *Subject:* Re: [Mne_analysis] ICA failing to exclude bad channels
>
> I suspect the problem may be in the definition of 'bads' -- Lyam are
> you explicitly marking channels 'bad' or you expecting automatic
> detection of bad channels (as e.g. some EEGLAB functions do)?
>
> Phillip
>
> On Tue, 2017-05-30 at 11:33 +0200, Alexandre Gramfort wrote:
> > Dear Lyam,
> >
> > ICA does ignore the bad channels see for example:
> >
> > https://github.com/mne-tools/mne-python/blob/master/mne/preprocessing
> <https://github.com/mne-tools/mne-python/blob/master/mne/preprocessing>
> mne-tools/mne-python
> <https://github.com/mne-tools/mne-python/blob/master/mne/preprocessing>
> github.com
> mne-python - MNE : Magnetoencephalography (MEG) and Electroencephalography
> (EEG) in Python
>
>
> > /ica.py#L408
> >
> > can you share a full gist of code to replicate the problem?
> >
> > Alex
> >
> >
> > On Mon, May 29, 2017 at 8:37 PM, Lyam Bailey <Lyam.Bailey at dal.ca>
> > wrote:
> > >
> > > Dear MNE users,
> > >
> > >
> > > I'm trying to analyse some EEG data which contains a few very noisy
> > > channels
> > > (amplitude is often to the order of 1V). This seems to be causing
> > > problems
> > > with ICA, even after bad channels are excluded
> > >
> > >
> > > I begin EEG preprocessing by excluding the bad channels, and then
> > > re-referencing the data to the average of all remaining channels
> > > with:
> > >
> > >
> > > raw.info['bads'] = ['CP1',etc...]
> > > raw, ref_data = set_eeg_reference(raw, ref_channels=None,
> > > copy=False)
> > >
> > > After filtering and trial-by-trial artifact rejection, I run ICA
> > > with:
> > >
> > > ica = mne.preprocessing.ICA(n_components=.99, method='fastica',
> > >                             max_iter=500,
> > > random_state=ica_random_state)
> > > picks = mne.pick_types(epochs.info, meg=False,
> > >                        eeg=True, eog=False, stim=False,
> > > exclude='bads')
> > > ica.fit(epochs)
> > >
> > > This usually outputs a single IC component, and does nothing to
> > > address
> > > blinks/saccades etc that are clearly present in the raw data. My
> > > feeling is
> > > that ICA is somehow failing to exclude the bad channels, meaning
> > > that (in
> > > the presence of much higher variance, introduced by the noisy
> > > channels) it
> > > is relatively blind to 'normal' artifacts in the EEG.
> > >
> > > Does anyone know why this might be happening? Any advice on the
> > > problem
> > > would be greatly appreciated!
> > >
> > > Regards
> > > Lyam
> > >
> > > ---------------------------------------------------------
> > >
> > > Lyam Bailey, BSc.
> > >
> > > Graduate Student
> > > Department of Psychology & Neuroscience
> > > Dalhousie University
> > >
> > >
> > > _______________________________________________
> > > Mne_analysis mailing list
> > > Mne_analysis at nmr.mgh.harvard.edu
> > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> Mne_analysis Info Page - Harvard University
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis>
> mail.nmr.mgh.harvard.edu
> Mne_analysis -- Discussion and support forum for the users of MNE Software
> About Mne_analysis
>
>
> > >
> > >
> > > 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
> *MailScanner has detected a possible fraud attempt from "www.partners.org"
> claiming to be* mycompliancereport.com
> <http://www.partners.org/complianceline>
> www.partners.org
> ComplianceLine engages in the business of providing 24-hour toll-free
> hotlines for the reporting and tracking of compliance concerns to assist in
> the identification of possible unethical, illegal or questionable behavior.
>
>
> > > you in
> > > error
> > > but does not contain patient information, please contact the sender
> > > and
> > > properly
> > > dispose of the e-mail.
> > >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> Mne_analysis Info Page - Harvard University
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis>
> mail.nmr.mgh.harvard.edu
> Mne_analysis -- Discussion and support forum for the users of MNE Software
> About Mne_analysis
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> Mne_analysis Info Page - Harvard University
> <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis>
> mail.nmr.mgh.harvard.edu
> Mne_analysis -- Discussion and support forum for the users of MNE Software
> About Mne_analysis
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170530/6d45d199/attachment-0001.html 


More information about the Mne_analysis mailing list