prcomp.HDF5Matrix

prcomp.HDF5Matrix

DECOMPOSITIONS

1 Usage

prcomp.HDF5Matrix(...)

2 Arguments

Parameter Description
x An object.
retx Logical. If (default) return the individual coordinates ( slot). If the slot is in the returned object.
center Logical. Subtract column means before PCA (default ).
scale. Logical. Divide by column SDs before PCA (default ).
tol Ignored (present for interface compatibility with ).
rank. Ignored. Present for compatibility with .
ncomponents Integer. Number of PCs to compute (0 = all, default).
k Number of local SVDs per incremental level (default 2).
q Number of incremental levels (default 1).
method Computation method: (default), , or .
rankthreshold Numeric in . Rank approximation threshold.
svdgroup HDF5 group for intermediate SVD storage (default ).
overwrite Logical. Recompute even if PCA results exist (default ).
threads Integer. OpenMP threads ( = auto-detect).

3 Value

An object of class with elements:

4 Examples

\donttest{
tmp <- tempfile(fileext = ".h5")
X   <- hdf5_create_matrix(tmp, "data/M", data = matrix(rnorm(1000), 100, 10))
pca <- prcomp(X, center = TRUE, scale. = FALSE)
cat("Variance explained (PC1-3):", pca$cumvar[1:3], "\n")
dim(pca$rotation)   # 10 x nPC
dim(pca$x)          # 100 x nPC
hdf5_close_all()
unlink(tmp)
}