限りなく院生に近いパリピ@エストニア

エストニアという国で一人ダラダラしてます。

DataScience

The Epsilon-Greedy Algorithm

ε-greedyは機械学習においてよく使われる方法であり、そんなに理解に苦しいアルゴリズムではない。 Exploit のみを続けることに対するリスクを緩和する方法である。僕が理解できれば、みんな余裕ってわけよ!例えば、今目の前に3台のスロットマシンがあると…

簡単に Bandit Algorithm Basic

What is Bandit Algorithm....スロットマシンをする時、気になるのは、「どのマシンが一番当たりを出しやすいか」である。今、目の前にスロットマジンが5台あるとして、50回遊べるだけのお金を持っているとしよう。今現在の状況として、目的:当たる確率…

A/B test with python (Bandit)

In this article, I am going to write a Bayesian Bandit algorithm. import matplotlib.pyplot as plt import numpy as np from scipy.stats import beta NUM_TRIALS = 2000 BANDIT_PROBABILITIES = [0.2, 0.5, 0.75] Bandit probabilities are divided in…

A/B test with python

This is just going to make our generated datas as well as is able to emulate a real data collection surface. class DataGenerator: def __init__(self, p1, p2): self.p1 = p1 self.p2 = p2 def next(self): if np.random.random() < self.p1: click1…