Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
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)