Zero-mean for data covariance and noise covariance estimation

Hi MNE community,

I am confused about whether baselining should be used when computing covariance matrices for LMCV beamforming.

I read in one place in the MNE documentation that baselining is important when computing a noise covariance estimate. And I have seen mentioned elsewhere is this forum and in the documentation for make_covariance that zero-mean data is important to ensure accurate covariance estimation.

However in the tutorial for LCMV beamforming it says that the data covariance should

be estimated from a time window that includes the brain signal of interest

which presumably will not always be zero-mean. Certainly the period of time used in the tutorial was not the period of time that was used for baselining.

My question is whether the need for zero-mean data is different for data covariance and noise covariance estimation. Perhaps it is even important to leave non-zero mean brain signals in the data when computing the data covariance matrix.

Thanks in advance for any thoughts or links to further reading.

Baselining removes the mean from each individual epoch. The computation of the covariance essentially concatenates all the epochs together and then removes the global mean.

Perhaps it is even important to leave non-zero mean brain signals in the data when computing the data covariance matrix.

You got it. We want to keep the differences between conditions intact, so we don’t want to remove the mean from individual epochs, just the global mean across all epochs (which is what the compute_covariance function will do for you, no need to do that manually)

Many thanks for your answer Marijn. That is helpful to know.

Just to be clear for my own understanding, is the situation different for computing noise covariance matrices? From the documentation it sounds like in that case we have to manually perform baselining ourselves.

For example, here

When computing the covariance, you should use baseline correction when constructing the epochs. Otherwise the covariance matrix will be inaccurate.

and here,

Baseline correction or sufficient high-passing should be used when creating the Epochs to ensure that the data are zero mean, otherwise the computed covariance matrix will be inaccurate

For epochs, you should baseline-correct first – the baseline is usually the pre-stimulus period (time < 0).

  • The noise covariance should then be estimated on that baseline period (zero-mean per channel; mne.compute_covariance(..., tmax=0)), while
  • the “data” covariance should be estimated on the epoch data after the baseline period (time >= 0; mean per channel different from zero; mne.compute_covariance(..., tmin=0)).

@richard Thank you for the information

1 Like