tsne-cuda
tsne-cuda copied to clipboard
Request for R bindings
Hi. I would love to see an R binding/wrapper to use your code from R. Is that possible/planned?
This is not currently a planned feature, however it certainly seems possible. You might consider looking at the file: https://github.com/CannyLab/tsne-cuda/blob/master/src/ext/pymodule_ext.cu, which is exposed in the library as a binding method for python, and could easily be adapted for R.
An alternative solution for R is to run Python inside R with the reticulate package. Like this for example :
library(reticulate) use_python("/home/fabien/anaconda2/bin/python") py_config() py_module_available("faiss") py_module_available("tsnecuda")
for the test example of tsnecuda
repl_python() from tsnecuda import TSNE import numpy as np X = np.random.random((5000, 50)) TSNE(verbose=1).fit_transform(X) exit