tsvd(x, nu, tol = 0.1, maxit = 20, tx, v, pca = FALSE)
scidb
objects corresponding to a matrix of left
singular vectors, a vector of singular values, and a matrix of transposed
right singular vectors, respectively.
tsvd
method uses Baglama and Reichel's efficient agumented
implicitly restarted Lanczos method for computing a truncated SVD of large
dense or sparse matrices. The method works best for the hard case of close to
square matrices. For matrices where the row and column dimensions are very
different (tall, skinny or short, fat matrices), consider the computationally
cheaper eigenvalue decomposition of the small matrix cross product instead.The method is an iterative one. The tol
parameter sets the error
tolerance as defined in the paper and the irlba package vignette available
on CRAN. Smaller values yield more accurate estimations at the cost of more
iterations.
The method requires multiplication by the matrix x
and its
transpose. If you already have the transpose matrix stored in SciDB, you
can optionally specify that in the tx
argument.
The starting vector v
defaults to a vector of ones. If this vector
is near the matrix null space then the algorithm may not converge. Specify
an alternate starting vector as required.
Set the pca
argument to TRUE
to indicate that you desire
principal components. The method will efficiently compute the singular
vectors of the centered matrix in that case, without explicitly forming
it to preserve sparsity.
scidb
## Not run:
# x <- as.scidb(matrix(rnorm(500*500),500))
# y <- tsvd(x)
# print(y)
# ## End(Not run)
Run the code above in your browser using DataLab