summary performance for ICA

Hi,

I used ICA for removing EOG and ECG (using CTPS) artifact.

Is there a function to compute the percentage of amplitude of the raw data was removed from the cardiac components (based the epoch with R peak as onset) ?

Thanks!

Best, Yuhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141027/c41a6c10/attachment.html

Hi Yuan,

that would be a nice addition. Either using r^2 or RMS differences as a metric. If you are interested in making a contribution I'd be happy to supervise you and review. I even have some private code for that.

-- Denis

Hi Yuhan,

I include the mailing list in this part of our conversation because this
might be interesting for other people as well.

2014-11-03 20:30 GMT+01:00 Chen, Yu-han <CHENY4 at email.chop.edu>:

Hi Dennis,

I (...) figured out that the SSP was turned on during epoching. Our

original problem is that when we tried to epoch raw data, ICA cleaned data,
ECG signal, the averaged ECG epoch is flat (zeros across the entire epoch).
When we set proj = False for mne.Epoch, the problem is resolved. Is it true
that by default, Epoch.py will set the SSP on?

Yes, you need to take care of this. Anyways I'm surprised you're getting
flat signals. What kind of SSPs did you include?

The data I feed in is the Elekta data with maxfiltered tsss and movement

correction applied.

Normally you have SSPS included in the raws if you don't use maxfilter. But
think there's no point in using those if you have maxfiltered your data.
If you aim to identify biological artifacts using ICA there is no point in
having ECG/EOG projections.
When using maxfilter and ICA, you should not necessarily use SSP in
addition.
FYI I'd recommend to look up the number of dimensions estimated by
maxfilter from the log or recover it by estimating the rank of the data and
using this as input to ICA(n_components).

HTH,
Denis

PS: what about the performance metric, still interested in contributing it?
:wink:

Thanks!
Yuhan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141103/8f1cf991/attachment.html

Hi Dennis,

Thanks a lot for youre reply. Please see my answers below:

Hi Yu-han,

take a look at this preprocessing script which I wrote to handle ICA for
Neuromag + EEG recordings with maxfilter present.
It's a prototype and might become a function / script at later stages.
Testing + input welcome, I'm trying not to overfilt the recordings from our
lab.

HTH,
Denis

2014-11-03 21:19 GMT+01:00 Chen, Yu-han <CHENY4 at email.chop.edu>:

Hi Dennis,

Thanks a lot for youre reply. Please see my answers below:

  From: Denis-Alexander Engemann <denis.engemann at gmail.com>
Date: Monday, November 3, 2014 2:43 PM
To: The Children's Hospital of Philadelphia The Children's Hospital of
Philadelphia <cheny4 at email.chop.edu>, "<Mne_analysis at nmr.mgh.harvard.edu>"
<Mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] summary performance for ICA

  Hi Yuhan,

I include the mailing list in this part of our conversation because this
might be interesting for other people as well.

2014-11-03 20:30 GMT+01:00 Chen, Yu-han <CHENY4 at email.chop.edu>:
>
> Hi Dennis,
>
> I (...) figured out that the SSP was turned on during epoching. Our
original problem is that when we tried to epoch raw data, ICA cleaned data,
ECG signal, the averaged ECG epoch is flat (zeros across the entire epoch).
When we set proj = False for mne.Epoch, the problem is resolved. Is it true
that by default, Epoch.py will set the SSP on?
>

Yes, you need to take care of this. Anyways I'm surprised you're getting
flat signals. What kind of SSPs did you include?

*** I didn't intentionally include any SSPs when I read in the data so I
don't know what type of SSP was included.

>
> The data I feed in is the Elekta data with maxfiltered tsss and movement
correction applied.
>

Normally you have SSPS included in the raws if you don't use maxfilter.
But think there's no point in using those if you have maxfiltered your data.
If you aim to identify biological artifacts using ICA there is no point in
having ECG/EOG projections.
When using maxfilter and ICA, you should not necessarily use SSP in
addition.
FYI I'd recommend to look up the number of dimensions estimated by
maxfilter from the log or recover it by estimating the rank of the data and
using this as input to ICA(n_components).

*** I wasn't planning to use SSP. In my case the SSPS was off when I
read in maxfiltered raw data. For some reason when I epoch the raw data, by
default the SSP was set on. So I think the Epoch.py function just set SSP
on. Should I always assume the SSP is on when I epoch any type of raw
Elekta data no matter the maxfilter was applied or not?

*** the n_components I used for ICA is 95% assuming 5% of our data is
noise. I realized I don't have the number of dimensions extimated from the
maxfilter log. Is this something I should specifically set when I run
maxfilter? Also could you please tell e how to get the estimated ran of the
data?

HTH,
Denis

PS: what about the performance metric, still interested in contributing
it? :wink:

*** I'm still using the exact same code from Juergen and I thought that
was already shared and uploaded to gitHub?

> Thanks!
> Yuhan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20141103/9eecc11e/attachment.html

Thanks Dennis! This is very helpful.

I'm also trying to make the preprocessing script later become a function. I will let you know how it goes.

Best, Yuhan

Hi Yuhan,

for the moment it would be great to just receive some feedback about it
works for your data.
I need to update the script, during the last week I singled out a series of
issues with filtering, which are relevant
for certain datasets. I still need to update this example accordingly. It
will be more important to converge on and decide about the most general and
relevant use cases before wrapping it in function. Also note that this is
specifically fitted to MEG and EEG datasets which come with EOG and ECG
recordings. The idea would be end up with a good preprocessing script that
does the job well in 80% of the cases.

Feel free to keep me posted about how it goes for you and don't hesitate to
ask me if something is not clear or behaves unexpectedly.

Best,
Denis

2014-11-03 22:32 GMT+01:00 Chen, Yu-han <CHENY4 at email.chop.edu>:

Thanks Dennis! This is very helpful.

I'm also trying to make the preprocessing script later become a
function. I will let you know how it goes.

Best, Yuhan

  From: Denis-Alexander Engemann <denis.engemann at gmail.com>
Reply-To: Discussion and support forum for the users of MNE Software <
mne_analysis at nmr.mgh.harvard.edu>
Date: Monday, November 3, 2014 3:38 PM
To: The Children's Hospital of Philadelphia The Children's Hospital of
Philadelphia <cheny4 at email.chop.edu>
Cc: "<Mne_analysis at nmr.mgh.harvard.edu>" <Mne_analysis at nmr.mgh.harvard.edu
>
Subject: Re: [Mne_analysis] summary performance for ICA

become

_______________________________________________
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/20141103/367854bf/attachment.html

Hi Yuhan, dear list,

I meanwhile transformed my script into a function, improved the code and
added tests.

You can access it here:

This is how the output looks like for the example script:

Feel free to use it, to suggest improvements or to contribute.

Best,
Denis

2014-11-03 22:55 GMT+01:00 Denis-Alexander Engemann <
denis.engemann at gmail.com>:

Hi Yuhan,

for the moment it would be great to just receive some feedback about it
works for your data.
I need to update the script, during the last week I singled out a series
of issues with filtering, which are relevant
for certain datasets. I still need to update this example accordingly. It
will be more important to converge on and decide about the most general and
relevant use cases before wrapping it in function. Also note that this is
specifically fitted to MEG and EEG datasets which come with EOG and ECG
recordings. The idea would be end up with a good preprocessing script that
does the job well in 80% of the cases.

Feel free to keep me posted about how it goes for you and don't hesitate
to ask me if something is not clear or behaves unexpectedly.

Best,
Denis

2014-11-03 22:32 GMT+01:00 Chen, Yu-han <CHENY4 at email.chop.edu>:

Thanks Dennis! This is very helpful.

I'm also trying to make the preprocessing script later become a
function. I will let you know how it goes.

Best, Yuhan

  From: Denis-Alexander Engemann <denis.engemann at gmail.com>
Reply-To: Discussion and support forum for the users of MNE Software <
mne_analysis at nmr.mgh.harvard.edu>
Date: Monday, November 3, 2014 3:38 PM
To: The Children's Hospital of Philadelphia The Children's Hospital of
Philadelphia <cheny4 at email.chop.edu>
Cc: "<Mne_analysis at nmr.mgh.harvard.edu>" <
Mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] summary performance for ICA

become

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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/20141129/d6d20055/attachment.html