T-distributed Stochastic Neighbor Embedding res = tSNE(Data, KNN=30,OutputDimension=2)
tSNE(DataOrDistances,k,OutputDimension=2,Algorithm='tsne_cpp',method="euclidean",Whitening=FALSE, Iterations=1000,PlotIt=FALSE,Cls,…)
Numerical matrix defined as either
Data
, i.e., [1:n,1:d], nonsymmetric, and consists of n cases of d-dimensional data points with every case having d attributes, variables or features,
or
Distances
, i.e.,[1:n,1:n], symmetric and consists of n cases, e.g., as.matrix(dist(Data,method))
number of k nearest neighbors=number of effective nearest neighbors("perplexity") Important parameter, if not given Settings of package t-SNE will be used
Number of dimensions in the Outputspace, default=2
tsne_cpp': T-Distributed Stochastic Neighbor Embedding using a Barnes-HutImplementation in C++ of Rtsne
'tsne_r': pure R implementation of the t-SNE algorithm of of tsne
method specified by distance string: 'euclidean','cityblock=manhatten','cosine','chebychev','jaccard','minkowski','manhattan','binary'
A boolean value indicating whether the matrix data should be whitened (tsne_r) or if pca should be used priorly (tsne_cpp)
maximum number of iterations to perform.
Default: FALSE, If TRUE: Plots the projection as a 2d visualization. OutputDimension>2: only the first two dimensions will be shown
[1:n,1] Optional,: only relevant if PlotIt=TRUE. Numeric vector, given Classification in numbers: every element is the cluster number of a certain corresponding element of data.
Further arguments passed on to either 'Rtsne' or 'tsne'
List of
[1:n,OutputDimension], n by OutputDimension matrix containing coordinates of the Projection
NULL for tsne_r, further information if tsne_cpp is selected
An short overview of different types of projection methods can be found in [Thrun, 2018, p.42, Fig. 4.1] (https://doi.org/10.1007/978-3-658-20540-9).
# NOT RUN {
data('Hepta')
Data=Hepta$Data
Proj=tSNE(Data,k=7)
# }
# NOT RUN {
PlotProjectedPoints(Proj$ProjectedPoints,Hepta$Cls)
# }
Run the code above in your browser using DataLab