refactor: faster calc_ground_truth_policy_value in SyntheticSlateBanditDataset #102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
new feature
len_list >= n_unique_actions
setting when usingis_factorizable
https://github.com/aiueola/zr-obp/blob/97ff9987716a7e1351ae30e135313a54e6e9fbbe/obp/dataset/synthetic_slate.py#L201
bug fix
_calc_epsilon_greedy_pscore
when usingis_factorizable
https://github.com/aiueola/zr-obp/blob/97ff9987716a7e1351ae30e135313a54e6e9fbbe/obp/dataset/synthetic_slate.py#L1122
refactor
calc_ground_truth_policy_value
by avoidingfor
loops withn_rounds
.is_factorizable=True
.https://github.com/aiueola/zr-obp/blob/f126964583c8d265eeb323301874a8060fbddd28/obp/dataset/synthetic_slate.py#L828
action_interaction_reward_function
(to calculateexpected_reward_factual
) with batch processing.https://github.com/aiueola/zr-obp/blob/f126964583c8d265eeb323301874a8060fbddd28/obp/dataset/synthetic_slate.py#L852
action_interaction_additive_reward_function
andaction_interaction_decay_reward_function
intoaction_interaction_reward_function
for the faster implementation and preventing memory error.https://github.com/aiueola/zr-obp/blob/f126964583c8d265eeb323301874a8060fbddd28/obp/dataset/synthetic_slate.py#L1162
is_factorizable=False
https://github.com/aiueola/zr-obp/blob/f126964583c8d265eeb323301874a8060fbddd28/obp/dataset/synthetic_slate.py#L838
result
len_list=5, n_unique_actions=10, n_rounds=1000,is_factorizable=True
is_factorizable=True
: 1.5minexpected_reward_factural
test
others