| PCA-methods {Cardinal} | R Documentation |
Performs principal components analysis efficiently on large datasets using implicitly restarted Lanczos bi-diagonalization (IRLBA) algorithm for approximate singular value decomposition of the data matrix.
## S4 method for signature 'SImageSet'
PCA(x, ncomp = 20,
method = c("irlba", "nipals", "svd"),
center = TRUE,
scale = FALSE,
iter.max = 100, ...)
## S4 method for signature 'PCA'
predict(object, newx, ...)
x |
The imaging dataset for which to calculate the principal components. |
ncomp |
The number of principal components to calculate. |
method |
The function used to calculate the singular value decomposition. |
center |
Should the data be centered first? This is passed to |
scale |
Shoud the data be scaled first? This is passed to |
iter.max |
The number of iterations to perform for the NIPALS algorithm. |
... |
Ignored. |
object |
The result of a previous call to |
newx |
An imaging dataset for which to calculate the principal components scores based on the aleady-calculated principal components loadings. |
An object of class PCA, which is a ResultSet, where each component of the resultData slot contains at least the following components:
scores:A matrix with the principal component scores.
loadings:A matrix with the principal component loadings.
sdev:The standard deviations of the principal components.
method:The method used to calculate the principal components.
ncomp:The number of principal components calculated.
center:The center of the dataset. Used for calculating principal components scores on new data.
scale:The scaling factors for the dataset. Used for calculating principal components scores on new data.
Kylie A. Bemis
sset <- generateImage(diag(4), range=c(200, 300), step=1) pca <- PCA(sset, ncomp=2)