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

metric = "cosine" bug #5

Closed
ONeillMB1 opened this issue Aug 14, 2018 · 1 comment
Closed

metric = "cosine" bug #5

ONeillMB1 opened this issue Aug 14, 2018 · 1 comment
Labels
bug Something isn't working

Comments

@ONeillMB1
Copy link

Thanks for developing this!

The umap function appears to have a bug when the 'metric = "cosine"' option is invoked. I get the following error:

Error in search_nn_func(index_file, X, k, search_k, grain_size = grain_size, :
vector::_M_range_insert

However, if I use 'metric = "manhattan" or leave it to the default it works just fine.

Best.

@jlmelville jlmelville added the bug Something isn't working label Aug 14, 2018
@jlmelville
Copy link
Owner

Thank you for reporting this! Fixed in the latest version (version 0.0.0.9002).

I was incorrectly checking for a 'Cosine' class, when Annoy uses 'Angular'. Compounding this, I failed to add an else clause to catch the 'impossible' situation of an unknown option (as recommended by all basic programming advice books ever). Shame on me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants