-
Notifications
You must be signed in to change notification settings - Fork 2
/
readme
32 lines (22 loc) · 1.07 KB
/
readme
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
This is a WordPress plugin for split testing helper.
Idea to definition proudly copied from Steve Hanov's blog: http://stevehanov.ca/blog/index.php?id=132
Thanks Steve!
def choose():
if math.random() < 0.1:
# exploration!
# choose a random lever 10% of the time.
else:
# exploitation!
# for each lever,
# calculate the expectation of reward.
# This is the number of trials of the lever divided by the total reward
# given by that lever.
# choose the lever with the greatest expectation of reward.
# increment the number of times the chosen lever has been played.
# store test data in redis, choice in session key, etc..
def reward(choice, amount):
# add the reward to the total for the given lever.
Regards, Andreas Ek, Flowcom AB
[Introduction](https://github.com/EkAndreas/flowsplit/wiki/1---Introduction)
[Installation](https://github.com/EkAndreas/flowsplit/wiki/2---Installation)
[Example](https://github.com/EkAndreas/flowsplit/wiki/3---Example)