svds
Subset of singular values and vectors
Syntax
Description
specifies additional options with one or more name-value pair arguments. For
example, s
= svds(A
,k
,sigma
,Name,Value
)svds(A,k,sigma,'Tolerance',1e-3)
adjusts the
convergence tolerance for the algorithm.
Examples
Input Arguments
Output Arguments
Tips
svdsketch
is useful when you do not know ahead of time what rank to specify withsvds
, but you know what tolerance the approximation of the SVD should satisfy.svds
generates the default starting vectors using a private random number stream to ensure reproducibility across runs. Setting the random number generator state usingrng
before callingsvds
does not affect the output.Using
svds
is not the most efficient way to find a few singular values of small, dense matrices. For such problems, usingsvd(full(A))
might be quicker. For example, finding three singular values in a 500-by-500 matrix is a relatively small problem thatsvd
can handle easily.If
svds
fails to converge for a given matrix, increase the size of the Krylov subspace by increasing the value of'SubspaceDimension'
. As secondary options, adjusting the maximum number of iterations ('MaxIterations'
) and the convergence tolerance ('Tolerance'
) also can help with convergence behavior.Increasing
k
can sometimes improve performance, especially when the matrix has repeated singular values.
References
[1] Baglama, J. and L. Reichel, “Augmented Implicitly Restarted Lanczos Bidiagonalization Methods.” SIAM Journal on Scientific Computing. Vol. 27, 2005, pp. 19–42.
[2] Larsen, R. M. “Lanczos Bidiagonalization with partial reorthogonalization.” Dept. of Computer Science, Aarhus University. DAIMI PB-357, 1998.