[MRG+1] Locality Sensitive Hashing for approximate nearest neighbor search#3894
[MRG+1] Locality Sensitive Hashing for approximate nearest neighbor search#3894maheshakya wants to merge 131 commits intoscikit-learn:masterfrom
Conversation
Rewritten _bisect_right with numpy searchsorted. Updated examples.
Replaced numpy searchsorted in _bisect_right with the previous version.
Insert operation allows to insert new data points into the fitted set of trees. (Can be used in incremental learning? ) Changed parameter m to n_neighbors. Changed parameter m to n_neighbors.
For _bisect_right() function, a transformed x is passed. The transformation will replace the characters after h hash length with '1's. Used random_projections module. GuassianRandomProjections in random_projections module is used to perform the hashing for Random projections LSH method.
GuassianRandomProjections in random_projections module is used to perform the hashing for Random projections LSH method.
Removed lshashinng in feature extraction and add that funtionality in the LSHForest class. If other hashing algorithms are to be implemented, a separate lshashing class may be required.
|
All right. |
To identify the actual error which raises the warning.
|
Raising the warning with |
No, that's not what stacklevel does. |
|
It might give you a better indication of which function call results in the warning, though. |
|
Yes. it's |
|
And this is happened before the expected warning in |
|
Surely the dot product is happening in the random projection process, not in the transformation to a hash? And even if the LHS of the dot product is integer queries, the RHS should be a gaussian-distributed hyperplane matrix, i.e. float-valued. So this must be a fixed bug in numpy that should cast the input to compatible types before calling BLAS. The correct solution in this case should be to modify |
|
Seems like that. I'll fix |
4583972 to
55e3149
Compare
55e3149 to
7802214
Compare
sklearn/utils/testing.py
Outdated
There was a problem hiding this comment.
This should be if not message_found:
|
@jnothman shall I change this to [MRG+1]? |
|
Yes! |
|
Thanks. |
There was a problem hiding this comment.
There's no /tmp on Windows machines, probably.
|
I'm rebasing this. I figured I could just merge this despite the number of commits, but some of the log messages (e.g. 802ed5f) don't reflect the changes made in the commits. |
|
Squashed to 62 commits and merged as #3980. Fixed the issues that @GaelVaroquaux and I found. Thanks @maheshakya! |
|
You are welcome @larsmans |
|
Congrats @maheshakya!! |
|
Thank you @jnothman , I'm really grateful to you for reviewing and suggestions for improvements and for the support. |
New PR created from #3304