pyriemann.utils.mean.mean_harmonic

pyriemann.utils.mean.mean_harmonic(covmats, sample_weight=None)[source]

Return the harmonic mean of a set of covariance matrices.

\[\mathbf{C} = (\frac{1}{N} \sum_i {\mathbf{C}_i}^{-1})^{-1}\]
Parameters:
  • covmats – Covariance matrices set, Ntrials X Nchannels X Nchannels
  • sample_weight – the weight of each sample
Returns:

the mean covariance matrix