estimate_rank#
- scipy.linalg.interpolative.estimate_rank(A, eps, rng=None)[source]#
- Estimate matrix rank to a specified relative precision using randomized methods. - The matrix A can be given as either a - numpy.ndarrayor a- scipy.sparse.linalg.LinearOperator, with different algorithms used for each case. If A is of type- numpy.ndarray, then the output rank is typically about 8 higher than the actual numerical rank.- Parameters:
- Anumpy.ndarrayorscipy.sparse.linalg.LinearOperator
- Matrix whose rank is to be estimated, given as either a - numpy.ndarrayor a- scipy.sparse.linalg.LinearOperatorwith the rmatvec method (to apply the matrix adjoint).
- epsfloat
- Relative error for numerical rank definition. 
- rngnumpy.random.Generator, optional
- Pseudorandom number generator state. When rng is None, a new - numpy.random.Generatoris created using entropy from the operating system. Types other than- numpy.random.Generatorare passed to- numpy.random.default_rngto instantiate a- Generator. If- randis- False, the argument is ignored.
 
- A
- Returns:
- int
- Estimated matrix rank.