hnswlib
hnswlib copied to clipboard
Why is entor point not updated?
https://github.com/nmslib/hnswlib/blob/68c5531caa8be522b19ac20088ffca39d1474520/hnswlib/hnswalg.h#L842-L854
This is different from the algorithm in the paper
I think that currObj
should be set to top_candidates.top().second
.
@wslfs Yeap, it is a bug.
@yurymalkov if I remember correctly, there was an issue in NMSLIB that complained about it too. However, some experiments showed that fixing the bug didn't help the overall performance. :-)
@searchivarius Well, it should have a big influence for the case of low dimensional data.
Thank you, I will create a pull request.
Is there a reason this has not been merged to master yet ?
@jelmerk I guess they will merger new pull request to branch develop before merged into master. This will make the master branch more stable.
Sounds like we should set currObj to be the closest one from last layer. set to top_candidates.top() seems set to a farest one since top_candidates is a max_heap. correct me if wrong. @uestc-lfs
@guocuimi I think you are right.
I forget to reopen this issue. I think @guocuimi is right. @yurymalkov I think this line should be changed, https://github.com/nmslib/hnswlib/blob/3c6a84fb54a2a92dc4b7dc3e13dbae3d99892444/hnswlib/hnswalg.h#L409
And these lines, commited by me : https://github.com/nmslib/hnswlib/blob/3c6a84fb54a2a92dc4b7dc3e13dbae3d99892444/hnswlib/hnswlib.h#L74-L76 The interface is not virtual, so it can not be overrided and it is not polymorphism. I suggest removing the template. Sorry for the bad code commited by me
I am not sure what is the problem. Can you do a PR?