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

Question: How to call ptsne.cpp from the commandline? (Working on a Python wrapper) #39

Open
jolespin opened this issue Oct 30, 2017 · 4 comments
Labels

Comments

@jolespin
Copy link

jolespin commented Oct 30, 2017

I want to write a Python wrapper that calls the very fast implementation in https://github.com/claczny/VizBin/blob/master/src/backend/bh_tsne/ptsne.cpp in the backend and then load the embeddings into pandas or numpy.

My main question is how to call the ptsne.cpp script in an OSX terminal?

It looks in the input data just needs to be parameters on each line and then the PCA components for each row separated by spaces between columns. Apologies if this is out-of-scope but I can post my code (if it works) on here if anyone would find it useful.

Suggested new issue via #15

@claczny
Copy link
Owner

claczny commented Oct 30, 2017

HI @jolespin

thanks for you interest in the fast tSNE implementation.

You can, however, not call the ptsne.cpp directly, but have to compile it into a binary first.
This is why the VizBin.jar integrates these and locally installs a binary matching the respective OS.
This is also what @piotr-gawron referred to, i.e., you must have a binary compiled for the respective OS.

We provide more info on this under https://github.com/claczny/VizBin/wiki/Minimal-Build-Environment.
For more info on the cross-compilation, you should also have a look at the respective Makefile @ https://github.com/claczny/VizBin/blob/master/src/backend/bh_tsne/Makefile.

Cheers,

Cedric

@jolespin
Copy link
Author

Thanks @claczny, I know you're busy with PhD stuff (from one of the VizBin threads) so I really appreciate the response. If VizBin is already compiled on a local machine, can the binary that it generates can be used for this? Or would it need to be generated separately.

@piotr-gawron
Copy link
Collaborator

piotr-gawron commented Oct 30, 2017

Yes it can.
For instance if you use dist jar file: https://github.com/claczny/VizBin/blob/master/VizBin-dist.jar you can extract it and go to /tsne dir. In this directory you can find precompiled tsne for Windows, Linux and MacOS.

@claczny
Copy link
Owner

claczny commented Nov 3, 2017

@jolespin

Regarding

I know you're busy with PhD stuff (from one of the VizBin threads)

that must be an older post ;) Currently finishing my first PostDoc.
That does not mean that I am less busy now, though XD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants