t-Distributed Stochastic Neighborhood Embedding
The t-Distributed Stochastic Neighborhood Embedding (t-SNE) is a statistical dimensionality reduction methods, based on the original SNE[1] method with t-distributed variant[2]. The method constructs a probability distribution over pairwise distances in the data original space, and then optimizes a similar probability distribution of the pairwise distances of low-dimensional embedding of the data by minimizing the Kullback-Leibler divergence between two distributions.
This package defines a TSNE type to represent a t-SNE model, and provides a set of methods to access its properties.
ManifoldLearning.TSNE — TypeTSNE{NN <: AbstractNearestNeighbors, T <: Real} <: NonlinearDimensionalityReductionThe TSNE type represents a t-SNE model constructed for T type data with a help of the NN nearest neighbor algorithm.
StatsAPI.fit — Methodfit(TSNE, data; p=30, maxoutdim=2, kwargs...)Fit a t-SNE model to data.
Arguments
data: a matrix of observations. Each column ofdatais an observation.
Keyword arguments
p: a perplexity parameter (defaut30).maxoutdim: a dimension of the reduced space (defaut2).maxiter: a total number of iterations for the search algorithm (defaut800).exploreiter: a number of iterations for the exploration stage of the search algorithm (defaut200).tol: a tolerance threshold (default1e-7).exaggeration: a tightness control parameter between the original and the reduced space (defaut12).initialize: an initialization parameter for the embedding (defaut:pca).rng: a random number generator object for initialization of the initial embedding.nntype: a nearest neighbor construction class (derived fromAbstractNearestNeighbors)
Examples
M = fit(TSNE, rand(3,100)) # construct t-SNE model
R = predict(M) # perform dimensionality reductionStatsAPI.predict — Methodpredict(R::TSNE)Transforms the data fitted to the t-SNE model R into a reduced space representation.