optVardim: Optimal projected variance of non orthogonal principal...

View source: R/optVardim.R

optVardimR Documentation

Optimal projected variance of non orthogonal principal components

Description

This function calculates the variance explained by not necessarily orthogonal principal components, using the optimal projected variance (optVar).

Usage

optVardim(B, Z)

Arguments

B

a numerical data matrix (usually centered and/or scaled, see details).

Z

a numerical loading matrix.

Details

The principal components are defined by Y=BZ where B is the centered and/or scaled data matrix and Z is the sparse loading matrix. The argument B must then be consistent with the pre-processing step in sparsePCA and groupsparsePCA. The loading vectors in Z must be unique norm and linearly independant.

Value

Returns the optimal projected variance of each principal components.

References

M. Chavent and G. Chavent, Optimal projected variance group-sparse block PCA, submitted, 2020.

See Also

pev, explainedVar, sparsePCA, groupsparsePCA

Examples

data(protein)
B <- sparsePCA(protein, 2, c(0.5,0.5))$B
Z <- sparsePCA(protein, 2, c(0.5,0.5))$Z
optVardim(B,Z)
 

chavent/sparsePCA documentation built on Feb. 2, 2023, 1:12 p.m.