reduceTSNE: t-distributed stochastic neighbor embedding (t-SNE)

View source: R/reduceFeatures-functions.R

reduceTSNER Documentation

t-distributed stochastic neighbor embedding (t-SNE)

Description

Performs t-SNE on a matrix-like object where rows represent features and columns represent samples.

Usage

reduceTSNE(x, ncomp = 2, normalize = TRUE, ...)

Arguments

x

A matrix-like object.

ncomp

A integer specifying the number of components to extract. Must be either 1, 2, or 3.

normalize

A logical specifying whether the input matrix is mean-centered and scaled so that the largest absolute of the centered matrix is equal to unity. See Rtsne::normalize_input for details.

...

Additional arguments passed to Rtsne::Rtsne.

Details

t-SNE is well-suited for visualizing high-dimensional data by giving each data point a location in a two or three-dimensional map. This function performs t-SNE with the transpose of x using Rtsne::Rtsne and returns a reduced.tsne object that is a matrix with custom attributes to summarize (via summary) and visualize (via plotReduced) the t-SNE result. The custom attributes include the following:

  • method: The method used to reduce the dimension of data.

  • ncomp: The number of components extracted.

  • perplexity: The perplexity parameter used.

  • theta: The speed/accuracy trade-off parameter used.

  • normalized: A logical indicating whether the data was normalized prior to t-SNE.

Value

A reduced.tsne object with the same number of rows as ncol(x) containing the dimension reduction result.

References

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

See Also

See reduceFeatures that provides a SummarizedExperiment-friendly wrapper for this function.

See plotReduced for visualization.

See Rtsne::Rtsne for the underlying function that does the work.

Examples


data(faahko_se)

m <- assay(faahko_se, "knn_vsn")
res <- reduceTSNE(m, perplexity = 3)
summary(res)


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