Subset of singular values and vectors
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.
svdsketch
is useful when you do not know ahead of time
what rank to specify with svds
, 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 using rng
before calling
svds
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, using svd(full(A))
might be quicker. For example, finding three singular values in a 500-by-500
matrix is a relatively small problem that svd
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.
[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.