# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
bhtsne = function(X, no_dims=2, perplexity=30, theta=0.5) {
if (nrow(X) - 1 < 3 * perplexity)
stop("Perplexity too large for the number of data points!")
result = .Call('bh_sne',
X = t(as.matrix(X)),
N = nrow(X),
D = ncol(X),
no_dims = no_dims,
perplexity = perplexity,
theta = theta,
PACKAGE = 'bhtsneR'
)
return(t(matrix(result, nrow=no_dims)))
}
tsne = function(X, no_dims=2, perplexity=30) {
bhtsne(X, no_dims, perplexity, theta=0)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.