-
Notifications
You must be signed in to change notification settings - Fork 10
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
Equivalent function to RcppAnnoy's a$getItemsVector(i) #18
Comments
I'll see what I can do @d4tum. Note to self: the Python binding C++ code is at: |
@d4tum the master branch now contains an implementation of the I have not yet parallelized this function so it might be slow if returning large number of vectors. Also, the hnsw library has recently had some stability issues with valgrind failures, other memory problems or compiler warnings, all of which prevent me from submitting a new version of the library to CRAN. I was hoping there would be a clean release of the library, because I really don't want to maintain a separate patched version of it internally to this package. I may take that step (or see what scope there is for submitting some more fixes upstream), but for now there is not likely to be an imminent CRAN submission. |
Fair enough and thank you for your efforts @jlmelville |
This feature is part of the CRAN 0.5.0 release. Sorry it took so long. |
Thanks for the great package!
There doesn't appear to be an equivalent function to a get the vector given an item's index number similar to RcppAnnoy's
a$getItemsVector(i)
wherei
is theitem
integer mapped to the vector within the index duringbuild
time. It appears the Python bindings has this feature but it's not been exposed in the R package -From the readme https://github.com/nmslib/hnswlib :
get_items(ids)
- returns a numpy array (shape:N*dim
) of vectors that have integer identifiers specified inids
numpy vector (shape:N
). Note that for cosine similarity it currently returns normalized vectors.Would you please expose this function in the R package?
The text was updated successfully, but these errors were encountered: