Skip to content
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

what's the effect of permutations hash object? #65

Open
vega110 opened this issue Jul 4, 2017 · 0 comments
Open

what's the effect of permutations hash object? #65

vega110 opened this issue Jul 4, 2017 · 0 comments

Comments

@vega110
Copy link

vega110 commented Jul 4, 2017

At first, I only put RandomBinaryProjections hash in my codes, and it did not yield good results ,but I can repeat run my query function, not include index vector function, eg engine.store_vector(vector, data);

when I add HashPermutations object in my code. such as
permutations = HashPermutations('p')
rbp_conf = {'num_permutation':50, 'beam_size':10, 'num_neighbour':10}
permutations.add_child_hash(rbp_perm, rbp_conf)
......
redis_storage.store_hash_configuration(rbp_perm)
permutations.build_permuted_index()
Finally the result is better than first.
but if I want to run query function ,I cann't remove 'engine.store_vector(vector, data); '.
so how can I only execute query function code, not include store vector codes.
just like,

redis_object = redis.Redis(host='localhost', port=0, db=0, unix_socket_path='/tmp/redis.sock')
redis_storage = RedisStorage(redis_object)
config = redis_storage.load_hash_configuration('v')
if config is None:
rbp_perm = RandomBinaryProjections('v', 30)
else:
rbp_perm = RandomBinaryProjections(None, None)
rbp_perm.apply_config(config)

 engine.candidate_count(query)
 engine.neighbours(query)

I hope you will soon answer my question. ths very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant