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

Calculate NN for only one vector #121

Closed
kentkawai opened this issue Dec 11, 2015 · 3 comments
Closed

Calculate NN for only one vector #121

kentkawai opened this issue Dec 11, 2015 · 3 comments

Comments

@kentkawai
Copy link

Hi,

In case I want to get NN for only one vector A1, "build" function needs to calculate NN for all vectors A1..n. But I don't need NN for vectors other than A1 vector, calculating NN for all other vectors is waste of time.
Are there any good way to calculate NN for only one vector?

@erikbern
Copy link
Collaborator

I don't understand... why don't you just compute the distance between A1 and all A2...An? You don't need Annoy to do this...

@kentkawai
Copy link
Author

Ah, maybe I misunderstood. I thought ANN is the fast algorithm to get NN for one vector.
Thank you for your suggestion.

@erikbern
Copy link
Collaborator

That's O(n) so it's hard to optimize...

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