pyriemann.utils.viz.plot_embedding¶
- pyriemann.utils.viz.plot_embedding(X, y=None, *, metric='riemann', title='Embedding of covariances', embd_type='Spectral', normalize=True)¶
Plot 2D embedding of SPD matrices.
- Parameters:
- Xndarray, shape (n_matrices, n_channels, n_channels)
Set of SPD matrices.
- yNone | ndarray, shape (n_matrices,), default=None
Labels for each matrix.
- metricstring, default=’riemann’
Metric used in the embedding. Can be {‘riemann’ ,’logeuclid’ , ‘euclid’} for Locally Linear Embedding and {‘riemann’ ,’logeuclid’ , ‘euclid’ , ‘logdet’, ‘kullback’, ‘kullback_right’, ‘kullback_sym’} for Spectral Embedding.
- titlestr, default=”Embedding of covariances”
Title string for plot.
- embd_type{‘Spectral’ ,’LocallyLinear’}, default=’Spectral’
Embedding type.
- normalizebool, default=True
If True, the plot is normalized from -1 to +1.
- Returns:
- figmatplotlib figure
Figure of embedding.