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

Load and save input similarities #25

Merged
merged 3 commits into from
Aug 17, 2018
Merged

Conversation

dkobak
Copy link
Collaborator

@dkobak dkobak commented Aug 16, 2018

I moved your unused code to load/save input similarities into run(). There is an additional input parameter that specifies whether Ps should be loaded, saved, or nothing. I added it to the all three wrappers (but only tested in Python).

What is loaded/saved are Ps after symmetrizing, so that's something I needed to change compared to your code (because the size of val_P/col_P changes after symmetrizing).

Also, if theta=0 then what is loaded/saved is the full P array.

@linqiaozhi
Copy link
Member

Hey @dkobak, this looks great! The R test script runs nicely, but running the Matlab test script examples/test.m gives an error:

>> cluster_firstphase = fast_tsne(X_clusters,opts);
Undefined function or variable 'load_affinities'.

Error in fast_tsne>write_data (line 299)
    fwrite(h, load_affinities, 'integer*4');

Error in fast_tsne (line 250)
    write_data('temp/data.dat',X, no_dims, theta, perplexity, max_iter, ...

It looks like load_affinities is not passed to the function write_data. If that's the bug, can you please fix it, commit, and I can go ahead and merge?

@dkobak
Copy link
Collaborator Author

dkobak commented Aug 17, 2018

Oops. Done.

@linqiaozhi
Copy link
Member

Great, thanks.

The loading actually still does not work in Matlab, because of the following lines.

https://github.com/dkobak/FIt-SNE/blob/master/fast_tsne.m#L113-L115

If you delete these lines, it should work.

@dkobak
Copy link
Collaborator Author

dkobak commented Aug 17, 2018

True, I did not notice those. Deleted.

@linqiaozhi linqiaozhi merged commit 4eb7f9b into KlugerLab:master Aug 17, 2018
@linqiaozhi
Copy link
Member

Merged, thanks so much, @dkobak!!

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

Successfully merging this pull request may close these issues.

2 participants