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

Comments

@ONeillMB1
Copy link

@ONeillMB1 ONeillMB1 commented Aug 14, 2018

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 label Aug 14, 2018
@jlmelville
Copy link
Owner

@jlmelville jlmelville commented Aug 14, 2018

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.