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 THIN tsvdm:
u,s,b = tsvdm(tensor_a, m, inv_m)whereu,vare(m,k,n)and(p,k,n)M-orthogonal tensors andsis an f-diagonal tensor of shape(k,k,n)andk=min(p,m)- 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,k,n)- tens_s: np.ndarray
A
(k,n)matrix representation of the f-diagonal tensor of shape(k,k,n)- tens_v: np.ndarray
M-orthogonal Tensor of shape
(p,k,n)