gpca: gPCA

View source: R/adaptivegpca-package.R

gpcaR Documentation

gPCA

Description

Performs standard gPCA with k components on a data matrix X with row inner product Q and weights D.

Usage

gpca(X, Q, D = rep(1, nrow(X)), k)

Arguments

X

A data matrix of size n \times p.

Q

An inner product matrix for the rows, either as a p \times p matrix or an eigendecomposition of such a matrix.

D

Sample weights, a vector of length n.

k

The number of components to return.

Value

A list with variable loadings on the principal axes (QV), sample/row scores (U), the fraction of the variance explained by each of the axes (vars).

Examples

data(AntibioticSmall)
out.gpca = gpca(AntibioticSmall$X, AntibioticSmall$Q, k = 2)

jfukuyama/adaptiveGPCA documentation built on Jan. 10, 2023, 3:22 p.m.