poplin_reduce: Dimension reduction methods

Description Usage Arguments Value See Also Examples

Description

In metabolomics, dimension reduction methods are often used for modeling and visualization. poplin_reduce is a wrapper for the following set of functions:

reduce_pca:

principal component analysis (PCA)

reduce_plsda:

partial least squares-discriminant analysis (PLS-DA)

reduce_tsne:

t-distributed stochastic neighbor embedding

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S4 method for signature 'matrix'
poplin_reduce(x, method = c("pca", "tsne", "plsda"), y, ncomp = 2, ...)

## S4 method for signature 'poplin'
poplin_reduce(
  x,
  method = c("pca", "tsne", "plsda"),
  xin,
  xout,
  y,
  ncomp = 2,
  ...
)

Arguments

x

A matrix or poplin object.

method

The dimension reduction method to be used, defaulting to "pca".

y

A factor vector for discrete outcome required for PLS-DA. Ignored otherwise.

ncomp

Output dimensionality.

...

Argument passed to a specific dimension reduction method.

xin

Character specifying the name of data to retrieve from x when x is a poplin object.

xout

character specifying the name of data to store in x when x is a poplin object.

Value

A matrix or poplin object with the same number of rows as ncol(x) containing the dimension reduction result.

See Also

Other data reduction methods: reduce_pca(), reduce_plsda(), reduce_tsne()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(faahko_poplin)

## poplin object
out <- poplin_reduce(faahko_poplin, method = "pca",
                     xin = "knn_cyclic", xout = "pca")
summary(poplin_reduced(out, "pca"))

## matrix
m <- poplin_data(faahko_poplin, "knn_cyclic")
poplin_reduce(m, method = "pca")
summary(out)

jaehyunjoo/poplin documentation built on Jan. 8, 2022, 1:13 a.m.