pyriemann.utils.mean.mean_logdet(covmats, tol=0.0001, maxiter=50, init=None, sample_weight=None)[source]

Return the mean covariance matrix according to the logdet metric.

This is an iterative procedure where the update is:

\[\mathbf{C} = \left(\sum_i \left( 0.5 \mathbf{C} + 0.5 \mathbf{C}_i \right)^{-1} \right)^{-1}\]
  • covmats – Covariance matrices set, Ntrials X Nchannels X Nchannels
  • tol – the tolerance to stop the gradient descent
  • maxiter – The maximum number of iteration, default 50
  • init – A covariance matrix used to initialize the iterative procedure. If None the Arithmetic mean is used
  • sample_weight – the weight of each sample

the mean covariance matrix