Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tSNE-class

t-Distributed Stochastic Neighborhood Embedding


Description

An S4 Class for t-SNE.

Details

t-SNE is a method that uses Kullback-Leibler divergence between the distance matrices in high and low-dimensional space to embed the data. The method is very well suited to visualize complex structures in low dimensions.

Slots

fun

A function that does the embedding and returns a dimRedResult object.

stdpars

The standard parameters for the function.

General usage

Dimensionality reduction methods are S4 Classes that either be used directly, in which case they have to be initialized and a full list with parameters has to be handed to the @fun() slot, or the method name be passed to the embed function and parameters can be given to the ..., in which case missing parameters will be replaced by the ones in the @stdpars.

Parameters

t-SNE can take the following parameters:

d

A distance function, defaults to euclidean distances

perplexity

The perplexity parameter, roughly equivalent to neighborhood size.

theta

Approximation for the nearest neighbour search, large values are more inaccurate.

ndim

The number of embedding dimensions.

Implementation

Wraps around Rtsne, which is very well documented. Setting theta = 0 does a normal t-SNE, larger values for theta < 1 use the Barnes-Hut algorithm which scales much nicer with data size. Larger values for perplexity take larger neighborhoods into account.

References

Maaten, L. van der, 2014. Accelerating t-SNE using Tree-Based Algorithms. Journal of Machine Learning Research 15, 3221-3245.

van der Maaten, L., Hinton, G., 2008. Visualizing Data using t-SNE. J. Mach. Learn. Res. 9, 2579-2605.

See Also

Examples

## Not run: 
dat <- loadDataSet("3D S Curve", n = 300)

## using the S4 class directly:
tsne <- tSNE()
emb <- tsne@fun(dat, tsne@stdpars)

## using embed()
emb2 <- embed(dat, "tSNE", perplexity = 80)

plot(emb, type = "2vars")
plot(emb2, type = "2vars")

## End(Not run)

dimRed

A Framework for Dimensionality Reduction

v0.2.3
GPL-3 | file LICENSE
Authors
Guido Kraemer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.