lvdmaaten/bhtsne

Fortran porting/implementation: suggestions

catubc opened this issue · 2 comments

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

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.

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