Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import falconn
- import numpy as np
- def test_lsh_index_positive():
- n = 1000
- d = 128
- p = falconn.get_default_parameters(n, d)
- t = falconn.LSHIndex(p)
- dataset = np.random.randn(n, d).astype(np.float32)
- t.fit(dataset)
- u = np.random.randn(d).astype(np.float32)
- t.find_k_nearest_neighbors(u, 10)
- if __name__ == '__main__':
- test_lsh_index_positive()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement