cr.sparse.la.effective_rank¶
- cr.sparse.la.effective_rank(A, rcond=None)[source]¶
Returns the effective rank of A based on its singular value decomposition
- Parameters
A (jax.numpy.ndarray) – Input matrix of size (M, N) where M is the dimension of the ambient vector space and N is the number of vectors in A
rcond (float) – Relative condition number. Singular values
s
smaller thanrcond * max(s)
are considered zero. Default: floating point eps * max(M,N).
- Returns
Returns the effective rank of A
- Return type
(int)
Examples
>>> A = random.normal(key, (3, 5)) >>> r = svd_effective_rank(A) >>> print(r) 3