Learn R Programming

rtemis (version 0.79)

d.SPCA: Sparse Principal Component Analysis

Description

Perform sparse and/or non-negative PCA or cumulative PCA decomposition using nsprcomp::nsprcomp or nsprcomp::nscumcomp respectively

Usage

d.SPCA(x, x.test = NULL, k = 1, nz = 0.5 * NCOL(x), nneg = TRUE,
  method = c("cumulative", "vanilla"), scale = TRUE, center = FALSE,
  verbose = TRUE, ...)

Arguments

x

Input matrix

x.test

Optional test set. Will be projected on to SPCA basis

k

Integer vector of length 1 or greater. N of components to return If set to 0, th determines eigenvalue below which PCs are ignored

nz

Integer: Upper bound on non-zero loadings. See nsprcomp::nscumcomp("k")

nneg

Logical: If TRUE, calculate non-negative loadings only. Default = TRUE

method

String: "cumulative" or "vanilla" sparse PCA. Default = "cumulative"

scale

LogSPCAl: If TRUE, scale input data before projecting. Default = TRUE

center

LogSPCAl: If TRUE, also center input data if scale is TRUE. Default = FALSE

verbose

Logical: If TRUE, print messages to screen. Default = TRUE

...

Additional parameters to be passed to fastSPCA::fastSPCA

Value

rtDecom object

Details

Project scaled variables to sparse and/or non-negative PCA components. Input must be n by p, where n represents number of cases, and p represents number of features. SPCA will be applied to the transpose of the n x p matrix.

See Also

Other Decomposition: d.CUR, d.H2OAE, d.H2OGLRM, d.ICA, d.ISOMAP, d.KPCA, d.LLE, d.MDS, d.NMF, d.PCA, d.SVD, d.TSNE, d.UMAP