-
Notifications
You must be signed in to change notification settings - Fork 20
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
How to use for vanilla K,L LSH with precomputed hashes #1
Comments
Hmm.. The LSH struct does need to know about your hashing function to be able to query. If you have a hashing function, you can implement the VecHash trait for that hashing function. The let mut lsh: LSH<MemoryTable, CustomHasher> = LshMem::new(n_projections, n_hash_tables, dim) Does that help your case? |
Thanks, that's definitely a good starting point, although my inputs are |
Yeah.. for now, I don't feel the extra complexity of generic inputs weighs up against an easy cast. :) |
I wholeheartedly concur, I tried futzing with the source to make the trait generic and it got complicated very quickly. Thanks again for the help. |
In case you are still interested. After some sweat, the crate is now generic for most numeric types. #3 |
That's great news! I actually realized at some point that the particular hashing method I was using is incompatible with the LSH data structure in this crate, since the hashers can't execute independently. I do have other ideas where the generics would help though, thanks for the update. |
Hello,
I'm curious to see if I can get this to work with plain
K, L
parametrized LSH. The setup is that I already have LVec
s each with K (u32) hashes of the input sample, which I'd like to be able to feed directly into the LSH. The LSH hasher in this case then only queries for exact matches in each of theL
hash tables and returns the union of all matches across all tables.Is such a setup possible using the current API?
Thanks,
Paul
The text was updated successfully, but these errors were encountered: