striatum icon indicating copy to clipboard operation
striatum copied to clipboard

probability normalization in exp4.p

Open ianlini opened this issue 8 years ago • 4 comments

https://github.com/ntucllab/striatum/blob/master/striatum/bandit/exp4p.py#L102 This normalization is not in the paper. Is this correct?

ianlini avatar Sep 12 '16 03:09 ianlini

I think this only transform query_vector to be np.ndarray?

ianlini avatar Sep 12 '16 04:09 ianlini

sum(query_vector) should be 1 form the theoretical aspect, but in python there may be some numerical errors so that the sum(query_vector) will be slightly larger or smaller than 1. So I further add this line to make sure that the sum of query_vector is 1.

taweihuang avatar Sep 12 '16 06:09 taweihuang

It transform query_vector to ndarray because every values in query_vector is np.float64, so that division make query_vector to be ndarray. It's quite unexpected.

ianlini avatar Sep 12 '16 06:09 ianlini

and why is it called query_vector? I think action_probability or something like this is better.

ianlini avatar Sep 12 '16 06:09 ianlini