View source: R/multiscaleSVDxpts.R
ba_svd | R Documentation |
This function performs SVD on a matrix using the built-in svd function in R. The matrix will be divided by its maximum value before computing the SVD for the purposes of numerical stability (optional). If svd fails, it automatically switches to random svd from the rsvd package. svd may fail to converge when the matrix condition number is high; this can be checked with the kappa function.
ba_svd(
x,
nu = min(nrow(x), ncol(x)),
nv = min(nrow(x), ncol(x)),
dividebymax = FALSE
)
x |
Matrix to perform SVD on |
nu |
Number of left singular vectors to return (default: min(nrow(x), ncol(x))) |
nv |
Number of right singular vectors to return (default: min(nrow(x), ncol(x))) |
dividebymax |
boolean |
A list containing the SVD decomposition of x
avgU <- matrix(rnorm(100*50), nrow = 100, ncol = 50)
nc <- 10
u <- ba_svd( avgU, nu = nc, nv = 0)$u
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.