Hitung dekomposisi nilai singular dari matriks persegi panjang.
svd(x, nu = min(n, p), nv = min(n, p), LINPACK = FALSE)<p></p><p>La.svd(x, nu = min(n, p), nv = min(n, p))</p>
| Parameter | Deskripsi |
|---|---|
x |
a numeric or complex matrix whose SVD decomposition is to be computed. Logical matrices are coerced to numeric. |
nu |
the number of left singular vectors to be computed. This must between 0 and n = nrow(x). |
nv |
the number of right singular vectors to be computed. This must be between 0 and p = ncol(x). |
LINPACK |
logical. Defunct and ignored. |
# NOT RUN {
hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
X <- hilbert(9)[, 1:6]
(s <- svd(X))
D <- diag(s$d)
s$u %*% D %*% t(s$v) # X = U D V'
t(s$u) %*% X %*% s$v # D = U' X V
# }