Description Usage Arguments Details Value References Examples
mmtsneP
estimates a multiple maps t-distributed stochastic neighbor
embedding (multiple maps t-SNE) model.
1 2 | mmtsneP(P, no_maps, no_dims = 2, max_iter = 500, momentum = 0.5,
final_momentum = 0.8, mom_switch_iter = 250, eps = 1e-07)
|
P |
An N x N symmetric joint probability distribution matrix.
These can be constructed from an N by D matrix with
|
no_maps |
The number of maps (positive whole number) to be estimated. |
no_dims |
The number of dimensions per map. Typical values are 2 or 3. |
max_iter |
The number of iterations to run. |
momentum |
Constant scaling factor for update momentum in gradient descent algorithm. |
final_momentum |
Constant scaling factor for update momentum in gradient descent algorithm after the momentum switch point. |
mom_switch_iter |
The iteration at which momentum switches from
|
eps |
A small positive value near zero. |
This code is an almost direct port of the original multiple maps t-SNE Matlab
code by van der Maaten and Hinton (2012). mmtsne
estimates a
multidimensional array of N x no_dims x no_maps
. Each map is an
N x no_dims
matrix of estimated t-SNE coordinates. When
no_maps=1
, multiple maps t-SNE reduces to standard t-SNE.
A list that includes the following objects:
An N x no_dims x no_maps
array of predicted coordinates.
An N x no_maps
matrix of unscaled weights. A high
weight on entry i, j indicates a greater contribution of point
i on map j.
An N x no_maps
matrix of scaled weights. A high
weight on entry i, j indicates a greater contribution of point
i on map j.
L.J.P. van der Maaten and G.E. Hinton. “Visualizing Non-Metric Similarities in Multiple Maps.” Machine Learning 87(1):33-55, 2012. PDF.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Load the iris dataset
data("iris")
# Produce a symmetric joint probability matrix
prob_matrix <- p2sp(x2p(as.matrix(iris[,1:4])))
# Estimate a mmtsne model with 2 maps, 2 dimensions each
model <- mmtsneP(prob_matrix, no_maps=2, max_iter=100)
# Plot the results side-by-side for inspection
# Points scaled by map proportion weights plus constant factor
par(mfrow=c(1,2))
plot(model$Y[,,1], col=iris$Species, cex=model$proportions[,1] + 0.2)
plot(model$Y[,,2], col=iris$Species, cex=model$proportions[,2] + 0.2)
par(mfrow=c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.