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

Duplicate labels permitted? #62

Closed
SeanU opened this issue Sep 27, 2018 · 2 comments
Closed

Duplicate labels permitted? #62

SeanU opened this issue Sep 27, 2018 · 2 comments

Comments

@SeanU
Copy link

SeanU commented Sep 27, 2018

HierarchicalNSW will allow you to add two different vectors with the same label, which seems slightly surprising to me.

I'm not sure what to suggest here, since I don't know what the intended behavior is; I just wanted to bring it up. For my purposes, I might prefer the ability to overwrite the old value. I realize that may not suit everyone's needs, though. I presume it would depend on issue #4, too.

@yurymalkov
Copy link
Member

Hi @SeanU, initially the labels where allowed to be duplicated (e.g. so that they can be used as classed for kNN classification), but after #57 is merged the labels will be required to be unique.

After the deletion will be added you would be able to overwrite old elements.

@SeanU
Copy link
Author

SeanU commented Sep 28, 2018

Hmm. That's a good point about making it more directly usable for KNN classification, though.

That said, if losing that feature is the cost of #57, maybe it's a net gain. It would be cheaper to maintain a map from labels to classes than it is to maintain a 2nd copy of all the vectors in memory for use cases like K-means clustering.

@SeanU SeanU closed this as completed Sep 28, 2018
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