do.tsne(
X,
ndim = 2,
perplexity = 30,
eta = 0.05,
maxiter = 2000,
jitter = 0.3,
jitterdecay = 0.99,
momentum = 0.5,
preprocess = c("null", "center", "scale", "cscale", "decorrelate", "whiten"),
pca = TRUE,
pcascale = FALSE,
symmetric = FALSE,
BHuse = TRUE,
BHtheta = 0.25
)
an
an integer-valued target dimension.
desired level of perplexity; ranging [5,50].
learning parameter.
maximum number of iterations.
level of white noise added at the beginning.
decay parameter in (0,1). The closer to 0, the faster artificial noise decays.
level of acceleration in learning.
an additional option for preprocessing the data.
Default is "null". See also aux.preprocess
for more details.
whether to use PCA as preliminary step; TRUE
for using it, FALSE
otherwise.
a logical; FALSE
for using Covariance, TRUE
for using Correlation matrix. See also do.pca
for more details.
a logical; FALSE
to solve it naively, and TRUE
to adopt symmetrization scheme.
a logical; TRUE
to use Barnes-Hut approximation. See Rtsne
for more details.
speed-accuracy tradeoff. If set as 0.0, it reduces to exact t-SNE.
a named list containing
an
a list containing information for out-of-sample prediction.
vandermaaten_visualizing_2008Rdimtools
# NOT RUN {
## load iris data
data(iris)
set.seed(100)
subid = sample(1:150,50)
X = as.matrix(iris[subid,1:4])
lab = as.factor(iris[subid,5])
## compare different perplexity
out1 <- do.tsne(X, ndim=2, perplexity=5)
out2 <- do.tsne(X, ndim=2, perplexity=10)
out3 <- do.tsne(X, ndim=2, perplexity=15)
## Visualize three different projections
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, pch=19, col=lab, main="tSNE::perplexity=5")
plot(out2$Y, pch=19, col=lab, main="tSNE::perplexity=10")
plot(out3$Y, pch=19, col=lab, main="tSNE::perplexity=15")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab