spd_learn.functional.innerproduct_euclid#
- spd_learn.functional.innerproduct_euclid(X, Y, *args)[source]#
Euclidean inner product.
Euclidean inner product \(\mathbf{g}\) between matrices \(\mathbf{X}\) and \(\mathbf{Y}\) is:
\[\mathbf{g}(\mathbf{X}, \mathbf{Y}) = \text{tr}(\mathbf{X}^H \mathbf{Y})\]- Parameters:
X (ndarray, shape (..., n, m)) – First matrices.
Y (ndarray, shape (..., n, m) | None) – Second matrices. If None, Y is set to X, giving the squared norm of X.
- Returns:
G – Euclidean inner product between X and Y.
- Return type:
float or ndarray, shape (…,)
Notes
Added in version 0.11.
Changed in version 0.12: Add support for NumPy and PyTorch.
See also