R/RcppExports.R

# 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)
}
mschubert/bhtsneR documentation built on May 23, 2019, 7:50 a.m.