deepmr.svd#
- deepmr.svd(input, ncoeff, axis)[source]#
Perform SVD compression of a signal.
The routine returns the SVD subspace basis, the compressed signal and the explained variance of the subspace.
- Parameters:
input (np.ndarray | torch.Tensor) – Input signal (real- or complex-valued).
ncoeff (int) – Number of subspace coefficients to be retained.
axis (int) – Compression axis.
- Returns:
basis (np.ndarray | torch.Tensor) – Subspace basis of shape (input.shape[axis], ncoeff).
output (np.ndarray | torch.Tensor) – Compressed signal of shape (…, ncoeff, …).
explained_variance (float) – Explained variance of the subspace. Values close to 100% indicates that information content of the signal is preserved despite compression.