April 2019
Intermediate to advanced
212 pages
5h 34m
English
Our technique in implementing an epsilon-greedy selection is by now a familiar process:
We've begun the process of implementing an epsilon-greedy algorithm:
for view in range(total_views): if random.random() < epsilon #exploration option: choose a random action ad = random.randrange(num_ads) else: #choose the best-performing ad so far ... reward = df.values[view, ad] total = total + reward
In the generalized bandit example, epsilon-greedy uses an epsilon value to decide whether to choose the current Best arm (exploit) or a random arm (explore). The following chart ...
Read now
Unlock full access