[Mne_analysis] MNE method is invariant to the scale of noise

Alexandre Gramfort alexandre.gramfort at inria.fr
Thu Feb 15 05:20:35 EST 2018
Search archives:

maybe this can help:

https://martinos.org/mne/stable/manual/source_localization/inverse.html#whitening-and-scaling

Alex

On Thu, Feb 15, 2018 at 7:45 AM, Evgenii Kalenkovich <
e.kalenkovich at gmail.com> wrote:

> Alexandre  thank you for your reply. It did help. I now understand why
> dSPM and sLORETA results differ even though MNE results do not. I am still
> confused as to why MNE results do not change.
>
> If I were to, say, go from millivolts to microvolts, then both the noise
> and the data would be scaled by 1e3 and noise covariance matrix - by 1e6
> and the SNR would stay the same. Same results of MNE with the same input
> but scaled covariance mean that here - where the data is scaled by 1e3 as
> well - I would get the source estimates scaled by 1e3 which is strange. I
> would expect (from the formulas on The minimum-norm current estimates
> <https://martinos.org/mne/stable/manual/source_localization/inverse.html>)
> that scaling of all the data should not change anything because the kernel
> would have changed reciprocally - by 1e-3. What am I missing?
>
> In my application I know the subject's structural information and
> electrode locations beforehand but I do not know how the data that I get in
> real time was preprocessed. At first, I used an identity covariance matrix
> to make the inverse solution. Then I scaled it by the mean variance of all
> EEG signals to tell mne-python the scale of the data but nothing changed,
> which is what led me to this question. Just explaining that I do not
> multiply random parts of the pipeline by random numbers :-)
>
> Evgenii
>
>
>> ---------- Forwarded message ----------
>> From: Alexandre Gramfort <alexandre.gramfort at inria.fr>
>> To: Discussion and support forum for the users of MNE Software <
>> mne_analysis at nmr.mgh.harvard.edu>
>> Cc:
>> Bcc:
>> Date: Wed, 14 Feb 2018 21:15:10 +0100
>> Subject: Re: [Mne_analysis] MNE method is invariant to the scale of noise
>> if you change noise scaling you should change the SNR as it means you have
>> a lot worse SNR. the regularization parameter lambda is a function of the
>> snr
>> as you can see in the script.
>>
>> dSPM and sLORETA are like t-stat or f-stat. So if you multiply the cov by
>> 1e6
>> then you will have dSPM and sLORETA solutions which are just divided by
>> 1e3
>> (the scale of the standard deviation).
>>
>> HTH
>> Alex
>>
>>
>>
>>
>> On Wed, Feb 14, 2018 at 8:33 PM, Evgenii Kalenkovich <
>> e.kalenkovich at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I noticed that if I scale the noise covariance matrix, it does not
>>> change the source estimates in any way. In this example
>>> <https://martinos.org/mne/stable/auto_tutorials/plot_mne_dspm_source_localization.html#sphx-glr-auto-tutorials-plot-mne-dspm-source-localization-py> from
>>> the example gallery if I change  the method to "MNE" before the first stc
>>> calculation and then do this:
>>>
>>> inverse_operator = make_inverse_operator(info, fwd, noise_cov,
>>>                                          loose=0.2, depth=0.8)
>>> stc = apply_inverse(evoked, inverse_operator, lambda2,
>>>                     method=method, pick_ori=None)
>>>
>>> from copy import deepcopy
>>> noise_cov_scaled = deepcopy(noise_cov)
>>> noise_cov_scaled['data'] *= 1000000
>>> inverse_operator_scaled = make_inverse_operator(info, fwd, noise_cov_scaled,
>>>                                          loose=0.2, depth=0.8)
>>> stc_scaled = apply_inverse(evoked, inverse_operator_scaled, lambda2,
>>>                            method=method, pick_ori=None)
>>>
>>>
>>> Then stc_scaled contains exactly the same data as stc. With "dSMP" and
>>> "sLORETA" the result do differ. Why doesn't "MNE" care about the scale of
>>> the covariance matrix?
>>>
>>> Evgenii
>>>
>>> _______________________________________________
>>> 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.
>>>
>>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
> <#m_5830397115252001268_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> 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/20180215/2de2224c/attachment-0001.html 


More information about the Mne_analysis mailing list