PRTools Contents PRTools User Guide
tsnem

TSNEM

### tSNE mapping

W = TSNEM(A,K,N,P,MAX)
W = A*TSNEM([],K,N,P,MAX)
W = A*TSNEM(K,N,P,MAX)
D = B*W

 Input A Dataset or matrix of doubles, used for training the mapping B Dataset, same dimensionality as A, to be mapped K Target dimension of mapping (default 2) N Initial dimension (default 30) P Perplexity (default 30) MAX Maximum number of iterations, default 1000

 Output W Trained mapping D 2D dataset

### Description

This is PRTools inteface to the t-SNE Simple Matlab routine for high  dimensional data visualisation. The output is a non-linear projection of  the original vector space to a K-dimensional target space. The procedure  starts with a preprocessing to N dimensions by PCA. The perplexity  determines the number of neighbors taken into account, see references.

The test dataset B is mapped on the target space by a linear mapping  between the dissimilarity representation of A and the target space. See  also multi-dimensional scaling by MDS or SAMMONM.

### Example(s)

prdatasets;            % make sure prdatasets is in the path
a = satellite;         % 36D dataset, 6 classes, 6435 objects
a = gendat(a,0.3);     % take a subset to make it faster
[x,y] = gendat(a,0.5); % split in train and test set
w = x*tsnem;           % compute mapping
figure; scattern(x*w); % show train set mapped to 2D: looks overtrained
figure; scattern((x+randn(size(x))*1e-5)*w); % some noise helps
figure; scattern(y*w); % show test set mapped to 2D
figure; scattern(y*pca(x,2)); % compare with pca

### Reference(s)

1. L.J.P. van der Maaten and G.E. Hinton. Visualizing High-Dimensional Data Using t-SNE. J. of ML Research, 2579-2605, 2008.
2. L.J.P. van der Maaten. Learning a Parametric Embedding by Preserving Local Structure. Proc. 12th Int. Conf. on AI and Stats. (AI-STATS), JMLR W&CP 5:384-391, 2009.
3. L.J.P. van der Maaten. Barnes-Hut-SNE. Proc. Int. Conf. on Learning Representations.
4. E. Pekalska, D. de Ridder, R.P.W. Duin, and M.A. Kraaijveld, A new method of generalizing Sammon mapping with application to algorithm speed-up, ASCI99, Proc. 5th Annual ASCI Conf., 1999, 221-228. [pdf]