gpcaFullFamily: Make a sequence of ordinations

View source: R/adaptivegpca-package.R

gpcaFullFamilyR Documentation

Make a sequence of ordinations

Description

Creates a sequence of gPCA data representations. One end of the sequence (r = 0) doesn't do any regularization according to the variable structure (and so is just standard PCA), and the other (r = 1) does a maximal amount of regularization according to the variable structure.

Usage

gpcaFullFamily(X, Q, weights = rep(1, nrow(X)), k = 2, rvec = (0:100)/100,
  findReflections = TRUE, returnLong = FALSE, sampledata = NULL,
  variabledata = NULL)

Arguments

X

A data matrix of size n \times p.

Q

A p \times p similarity matrix defining an inner product on the rows of X.

weights

A vector of weights for the rows of X.

k

The number of components to compute for each ordination.

rvec

The values of r for which to make the ordinations.

findReflections

Whether or not flip the axes so as to make neighboring ordinations as close as possible. If k is very large this should be false since all possible axis combinations are searched over.

returnLong

Return a long data frame with the samples/variables instead of a list of data frames.

sampledata

Extra sample data to be included along with the sample scores.

variabledata

Extra variable data to be included along with the variable loadings.

Value

A list containing elements for the sample points (locationList), the species points (speciesList), and the variance fractions (varsList). Each element is itself a list of data frames (location/species points) or of vectors (for the variances).

Examples

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

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