ml_compress_fac

SVD-based column/row compression.

Contents

Syntax

Z = ml_compress_fac(Z, tol, type)

Description

Computes a column or row compression of the matrix Z using the SVD.
Usually used to approximate the products Z'*Z or Z*Z' via a low-rank
factor.

Input

Z    - matrix of dimensions n x m
tol  - nonnegative scalar, tolerance multiplied with the largest
       singular value to determine the rank of the approximation
type - string, switching between row and column compression
         'c', 'col', 'column' - for column compression
         'r', 'row'           - for row compression

Output

Z    - matrix of dimensions n x r in case of column compression and
       r x m in case of row compression

See Also

ml_compress_ldl