限りなく院生に近いニート@エストニア

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

python

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…