Unverified Commit 0fb0fa84 authored by Tobias Morville's avatar Tobias Morville Committed by GitHub
Browse files

Added .values to series object to prevent crash when running data_sampler. (#7951)


Co-authored-by: default avatarTobias Morville <tmo@Tobiass-MacBook-Pro.local>
parent 9180defb
...@@ -71,7 +71,7 @@ def sample_mushroom_data(file_name, ...@@ -71,7 +71,7 @@ def sample_mushroom_data(file_name,
size=num_contexts) size=num_contexts)
eat_reward = r_eat_safe * df.iloc[ind, 0] eat_reward = r_eat_safe * df.iloc[ind, 0]
eat_reward += np.multiply(random_poison, df.iloc[ind, 1]) eat_reward += np.multiply(random_poison, df.iloc[ind, 1])
eat_reward = eat_reward.reshape((num_contexts, 1)) eat_reward = eat_reward.values.reshape((num_contexts, 1))
# compute optimal expected reward and optimal actions # compute optimal expected reward and optimal actions
exp_eat_poison_reward = r_eat_poison_bad * prob_poison_bad exp_eat_poison_reward = r_eat_poison_bad * prob_poison_bad
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment