S4 class for deflation SVD/PCA results.
Computes scores for new samples by projecting newdata onto the right
singular vectors. Equivalent to PCA "out-of-sample prediction".
Usage
# S4 method for class 'svd,ANY,ANY,ANY'
x[i]
# S4 method for class 'svd'
head(x, n = getOption("digits"), ...)
# S4 method for class 'svd'
show(object)
# S4 method for class 'svd'
dim(x)
reconstruct(object, ...)
# S4 method for class 'svd'
reconstruct(object, ...)
# S4 method for class 'svd'
predict(object, newdata, ...)
variance_explained(object, ...)
# S4 method for class 'svd'
variance_explained(object, ...)Value
A subsetted svd object containing only the selected factors.
Invisibly returns the svd object x.
Invisibly returns the svd object.
Integer vector of length 3: c(m, n, k) where m is the number of
rows, n the number of columns, and k the rank.
Dense matrix: \(U \cdot diag(d) \cdot V'\) (plus row means if centered)
A numeric matrix of scores with nrow(newdata) rows and
length(object@d) columns (i.e., same \(k\) as the model).
Each row is the projection of one new sample onto the singular space.
Numeric vector of proportion of variance explained by each factor