Effect of covariance matrix method on inverse operators

I have been looking at how noise covariance matrices affect the inverse operator and have made a curious observation: when I compute the ncm from my continuous raw MEG data, the ncms look very different depending on whether I use “empirical” or “shrunk” as method, but when I construct inverse operators using these very different ncms, the K matrices are virtually identical (difference < 1% for 99% of entries).

This seems quite remarkable to me: Why is the effect of the ncm so small here? Are there constellations (e.g. using epoched data, or low-quality data) where it might play a bigger role?

MNE 0.23, Python 3.9, Windows Server 2019

Code excerpt:

ncm_raw_sh = mne.compute_raw_covariance(data_raw, method='shrunk', 
                                        rank='info', tmin=10, tmax=60)
ncm_raw_em = mne.compute_raw_covariance(data_raw, method='empirical', 
                                        rank='info', tmin=10, tmax=60)

inv_raw_sh = mne.minimum_norm.make_inverse_operator(
    data_raw.info, fwd, ncm_raw_sh, loose=0)
inv_raw_em = mne.minimum_norm.make_inverse_operator(
    data_raw.info, fwd, ncm_raw_em, loose=0) 

inv_prep_sh = mne.minimum_norm.prepare_inverse_operator(inv_raw_sh, 1, 1./9, 'dSPM')
inv_prep_em = mne.minimum_norm.prepare_inverse_operator(inv_raw_em, 1, 1./9, 'dSPM')

K_sh, noise_norm, vertno, source_nn = mne.minimum_norm.inverse._assemble_kernel(
    inv_prep_sh, label=None, method='dSPM', pick_ori=None)
K_em, noise_norm, vertno, source_nn = mne.minimum_norm.inverse._assemble_kernel(
    inv_prep_em, label=None, method='dSPM', pick_ori=None)

if you use shrunk with a lot of data your estimation is pretty much the same as empirical, ie
no need to shrink/regularize with enough data.


1 Like

Which estimation do you mean is the same?
The ncms matrices are obviously quite different; my interpretation from these results would be that ncms barely contribute to the inverse operator at all.

what is the rank of your matrices?

can you show me the mne.viz.plot_cov for both matrices?


The rank is 298 (97 + 201 for mag and grad, resp.) for the shrunk matrix, and 306 for the empirical one.

I am still curious whether anyone has any answer to this question:

sorry Felix I don’t have much time to look further into this