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

Fortran porting/implementation: suggestions #49

Open
catubc opened this issue Jan 28, 2017 · 2 comments
Open

Fortran porting/implementation: suggestions #49

catubc opened this issue Jan 28, 2017 · 2 comments

Comments

@catubc
Copy link

catubc commented Jan 28, 2017

Laurens (and anyone else)

I've got a stupid question: we're stuck with some very complex Fortran code for neural recording analysis. Basically we can't really write the fortran suite from scratch, but would love to try tSNE somehow.

What do you recommend? I'm willing run tSNE through Fortran system calls, but that's quite a hack. Do you know anyone implementing your work in Fortran?

Thanks for your time.
catubc

@lvdmaaten
Copy link
Owner

I have never used Fortran, but I imagine by far the simplest way to use this code in your Fortran program is by (1) writing a bit of Fortran code that writes the data to a binary file, executes the t-SNE binary, and reads the results back in from file or (2) writing a bit of Fortran code that calls directly into the C/C++ code via some kind of foreign function interface (FFI). The second approach is arguably cleaner, but was is implemented now in Python and Matlab are wrappers of the first type. The wrappers are very minimal, so it shouldn't be much work to write one in Fortran. You can look at the existing Matlab wrapper for inspiration.

@catubc
Copy link
Author

catubc commented Jan 29, 2017

Thanks for the response. Yes, I was thinking something along lines of (1). The extra effort will definitely be worth while if tSNE is working out for us. I'll implement it and get back to you.
Thanks again, Cat

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

No branches or pull requests

2 participants