[Mne_analysis] [Freesurfer] question about how to calculate COV for MNE

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Sat Apr 5 05:51:44 EDT 2014
Search archives:

hi joe,

>>    I have a question about how to calculate the COV for the MNE software.
>> As I understand it from Section 4.17 of the 2.7.3 MNE manual, if one is
>> averaging together COV matrices, one weights them by the number of
>> observations going into each one.  I also see from Section 4.17.2 that these
>> are technically not covariance matrices so much as sum-of-squares matrices
>> where the epochs going into each variable has been baseline corrected.
>>
>>    Assuming my understanding so far is correct, my question is about how to
>> proceed when making linear combinations of COV matrices, as in a difference
>> wave, as discussed in Section 6.3.  Would the following be the correct
>> procedure?
>>
>>    Compute the COV separately for the two conditions (say standard and rare
>> oddballs).  Subtract the two COV matrices to obtain C0.

Subtracting two COV matrices is a bad idea. You can make the new cov
non positive.

basically the noise cov is just to estimate the noise so any sample you use
to get a better estimate the better. There is no condition or contrast
at this stage.

for source reconstruction you should use the same noise cov for the two
conditions to have the same inverse operator.

you can look at this file to know more about the internals:

https://github.com/mne-tools/mne-python/blob/master/mne/cov.py

HTH
Alex


>> Then calculate C by
>> dividing by Leff, which in turn is calculated as Leff= (L1*L2)/(L1+L2) where
>> L1 is the number of observations in the first COV matrix and L2 is for the
>> second.
>>
>>    But if done in this way, the two COV matrices would not be weighted by
>> their relative sample sizes.  So would I also weight them by L1 and L2
>> during the subtraction, as done for averaging per 4.17?  But then what is
>> the purpose of the Leff calculation? Or is the idea that one would calculate
>> a single COV based on both conditions and then one would modify COV by Leff
>> to reflect that the signal-to-noise ratio has been reduced by combining two
>> averages with differing sample sizes?  But in the case where both samples
>> equal, say, 10, Leff would end up equalling 100/20=5.  Dividing C by 5 seems
>> like too much.  Anyway, very confused.  Any guidance would be appreciated.
>>
>> Respectfully,
>>
>> Joe
>>
>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>> Joseph Dien,
>> Senior Research Scientist
>> Maryland Neuroimaging Center
>> University of Maryland
>>
>> E-mail: jdien07 at mac.com
>> Phone: 202-297-8117
>> http://joedien.com
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Freesurfer mailing list
>> Freesurfer at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>> 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.
>>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



More information about the Mne_analysis mailing list