reduceFeatures: Dimension reduction methods

reduceFeaturesR Documentation

Dimension reduction methods

Description

Performs dimensionality reduction on a matrix-like object or SummarizedExperiment object.

Usage

## S4 method for signature 'ANY'
reduceFeatures(x, method = c("pca", "tsne", "plsda"), ncomp = 2, y, ...)

## S4 method for signature 'SummarizedExperiment'
reduceFeatures(x, method = c("pca", "tsne", "plsda"), ncomp = 2, i, y, ...)

Arguments

x

A matrix-like object or SummarizedExperiment object.

method

A string specifying which dimension-reduction method to use.

ncomp

A integer specifying the number of components extract.

y

A factor vector for the information about each sample's group.

...

Arguments passed to a specific dimension-reduction method.

i

A string or integer value specifying which assay values to use when x is a SummarizedExperiment object.

Details

Currently, principal component analysis (PCA), t-distributed stochastic neighbor embedding (t-SNE), and partial least squares-discriminant analysis (PLS-DA) are supported. For the method argument,

pca performs PCA using singular value decomposition. If there is any missing value, the non-linear iterative partial least squares (NIPALS) algorithm is used instead using the pcaMethods::nipalsPca. See reducePCA for details.

tsne performs t-SNE using the Rtsne::Rtsne. See reduceTSNE for details.

plsda performs PLS-DA using a standard PLS model for classification with the pls::plsr. See reducePLSDA for details.

Value

A matrix containing custom attributes related to the dimension-reduction method used.

References

Wold, H. (1966). Estimation of principal components and related models by iterative least squares. In P. R. Krishnajah (Ed.), Multivariate analysis (pp. 391-420). NewYork: Academic Press.

Stacklies, W., Redestig, H., Scholz, M., Walther, D. and Selbig, J. pcaMethods – a Bioconductor package providing PCA methods for incomplete data. Bioinformatics, 2007, 23, 1164-1167

L.J.P. van der Maaten and G.E. Hinton. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research 9(Nov):2579-2605, 2008.

L.J.P. van der Maaten. Accelerating t-SNE using Tree-Based Algorithms. Journal of Machine Learning Research 15(Oct):3221-3245, 2014.

Jesse H. Krijthe (2015). Rtsne: T-Distributed Stochastic Neighbor Embedding using a Barnes-Hut Implementation, URL: https://github.com/jkrijthe/Rtsne

Kristian Hovde Liland, Bjørn-Helge Mevik and Ron Wehrens (2021). pls: Partial Least Squares and Principal Component Regression. R package version 2.8-0. https://CRAN.R-project.org/package=pls

See Also

See reducePCA, reduceTSNE, and reducePLSDA for the underlying functions that do the work.

Examples


data(faahko_se)

## SummarizedExperiment object
res_pca <- reduceFeatures(faahko_se, i = "knn_vsn", method = "pca")
summary(res_pca)

## Matrix
y <- factor(colData(faahko_se)$sample_group)
m <- assay(faahko_se, i = "knn_vsn")
res_plsda <- reduceFeatures(m, method = "plsda", y = y, ncomp = 3)
summary(res_plsda)


HimesGroup/qmtools documentation built on April 16, 2023, 8 p.m.