Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for R bindings #24

Open
ivokwee opened this issue Nov 6, 2018 · 2 comments
Open

Request for R bindings #24

ivokwee opened this issue Nov 6, 2018 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ivokwee
Copy link

ivokwee commented Nov 6, 2018

Hi. I would love to see an R binding/wrapper to use your code from R. Is that possible/planned?

@DavidMChan DavidMChan added enhancement New feature or request good first issue Good for newcomers labels Nov 12, 2018
@DavidMChan
Copy link
Member

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.

@fabien-w
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants