mprod.decompositions.svdm¶
- mprod.decompositions.svdm(tens_a: numpy.ndarray, fun_m: Callable[numpy.ndarray, numpy.ndarray], inv_m: Callable[numpy.ndarray, numpy.ndarray], hats: bool = False) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]¶
The svdm function is a helper function for computing the tsvdmII. This function does the FULL tsvdm decomposition:
u,s,b = tsvdm(tensor_a, m, inv_m)whereu,vare of shapes(m,m,n)and(p,p,n), M-orthogonal tensors andsis f-diagonal tensor of shape(m,p,n)- Parameters
- tens_a: np.ndarray
Tensor of shape
(m,p,n)- fun_m: MatrixTensorProduct
Invertible mat-vec operation for transforming
tens_atube fibers- inv_m: MatrixTensorProduct
Invertible mat-vec operation for transforming
tens_atube fibers. This operation is the inverse offun_m- hats: bool
Setting this to
Truewill cause the function to return the tsvdm factors in the tensor domain transform.
- Returns
- tens_u: np.ndarray
M-orthogonal tensor of shape
(m,m,n)- tens_s: np.ndarray
f-diagonal tensor of shape
(m,p,n)- tens_v: np.ndarray
M-orthogonal Tensor of shape
(p,p,n)