striatum
striatum copied to clipboard
probability normalization in exp4.p
https://github.com/ntucllab/striatum/blob/master/striatum/bandit/exp4p.py#L102 This normalization is not in the paper. Is this correct?
I think this only transform query_vector
to be np.ndarray
?
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.
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.
and why is it called query_vector
?
I think action_probability
or something like this is better.