Comments (2)
Have you tried increasing the number of probes?
from falconn.
Sure!
Here's little bit simpler code, goal is to get more than 3 results:
import falconn
import numpy as np
params_cp = falconn.LSHConstructionParameters()
params_cp.dimension = 6
params_cp.lsh_family = falconn.LSHFamily.CrossPolytope
params_cp.distance_function = falconn.DistanceFunction.EuclideanSquared
params_cp.l = 50
params_cp.num_rotations = 3
params_cp.seed = 5721840
params_cp.num_setup_threads = 1
params_cp.storage_hash_table = falconn.StorageHashTable.BitPackedFlatHashTable
# 2**17 <= N_SAMPLES
falconn.compute_number_of_hash_functions(17, params_cp)
table = falconn.LSHIndex(params_cp)
qdata = np.array([[1,1,1,1,0,0],
[1,2,1,2,0,0],
[2,1,2,1,0,0],
[0,0,0,1,1,1],
[0,0,0,1,2,2],
], dtype=np.float32)
table.setup(qdata)
centroid_index = table.construct_query_object()
centroid_index.set_num_probes(5000)
print(len(centroid_index.find_k_nearest_neighbors(qdata[0], k=200)))
print(len(centroid_index.find_near_neighbors(qdata[0], threshold=10e10)))
Also tried to play with storage_hash_table, num_rotations, l, k - nothing changed.
from falconn.
Related Issues (20)
- windows install falconn failure HOT 1
- Comment. Application to associative memory
- How to save the hash table? HOT 1
- Calculating similarity
- website certificate expired HOT 1
- The similarity Values
- Not returning specified number of neighbors
- Better explanation regarding windows
- something error in params.feature_hashing_dimension parameters HOT 1
- Unable to install python through repository
- The header-only library seems broken HOT 1
- Distance returned is more than 1 and it's also negated when using EuclideanSquared on normalized vectors
- Package is not be able to install inside python docker image
- Detailed steps for running code
- Why can get two vectors' similarity after random projection? HOT 1
- Compile error: error: unknown register name ‘%ymm14’ in ‘asm’
- How to get similar candidate?
- FALCONN KNN alternative to save as pickle? HOT 1
- The website does not load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from falconn.