pyriemann.geometry.covariance.normalize¶
- pyriemann.geometry.covariance.normalize(X, norm)[source]¶
Normalize a set of square matrices, using corr, trace or determinant.
- Parameters:
- Xndarray, shape (…, n, n)
Set of square matrices. Matrices must be invertible for determinant-normalization.
- norm{“corr”, “trace”, “determinant”}
Type of normalization:
“corr”: normalized matrices are correlation matrices, with values in [-1, 1] and diagonal values equal to 1;
“trace”: trace of normalized matrices is 1;
“determinant”: determinant of normalized matrices is +/- 1.
- Returns:
- Xnndarray, shape (…, n, n)
Set of normalized matrices, same dimensions as X.
Notes
Added in version 0.2.7.
Changed in version 0.12: Add support for NumPy and PyTorch.