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.