View source: R/reduceFeatures-functions.R
reduceTSNE | R Documentation |
Performs t-SNE on a matrix-like object where rows represent features and columns represent samples.
reduceTSNE(x, ncomp = 2, normalize = TRUE, ...)
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. |
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.
A reduced.tsne object with the same number of rows as ncol(x)
containing the dimension reduction result.
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 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.
data(faahko_se)
m <- assay(faahko_se, "knn_vsn")
res <- reduceTSNE(m, perplexity = 3)
summary(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.