Learn R Programming

adaptiveGPCA (version 0.1.3)

adaptivegpca: Adaptive gPCA

Description

Performs adaptive generalized PCA, a dimensionality-reduction method which takes into account similarities between the variables. See Fukuyama, J. (2017) for more details.

Usage

adaptivegpca(X, Q, k = 2, weights = rep(1, nrow(X)))

Value

A list containing the row/sample scores (U), the variable loadings (QV), the proportion of variance explained by each of the principal components (vars), the value of \(r\) that was used (r).

Arguments

X

A \(n \times p\) data matrix.

Q

A \(p \times p\) similarity matrix on the variables defining an inner product on the rows of X, can also be given as an eigendecomposition (formatted as the output from eigen).

k

The number of components to return.

weights

A vector of length \(n\) containing weights for the rows of X.

Examples

Run this code
data(AntibioticSmall)
out.agpca = adaptivegpca(AntibioticSmall$X, AntibioticSmall$Q, k = 2)

Run the code above in your browser using DataLab