skbio.stats.ordination.svd_rank#

skbio.stats.ordination.svd_rank(M_shape, S, tol=None)[source]#

Matrix rank of M given its singular values S.

See np.linalg.matrix_rank for a rationale on the tolerance (we’re not using that function because it doesn’t let us reuse a precomputed SVD).