?????????????????????????????????????????????? 10%????????????澭??????????????????????????????? 5%???????????????????? NB ??????Щ??????????????
????A/B ??????????÷??????????????????????????ó??????????????????????????????????????????Ч??????????
????· A/B ???????????????????
????· A/B ????????????????????????
????A/B ???????????????????
???????? 1. ??п????????????
????A/B ???????????????????????????????????£????????????????仯????????????????????????????????????????п???????????????????????????????仯??????????????????????????? A/B ?????????ò????????????仯????????????????
????A/B ????????????????????????
???????????????????????????????????仯??????????仯?????????仯
?????????е??? A/B ??????????????
??????????????仯
???????? 2. ?????????????????
?????2??????????????????????????????????????????? A/B ?????????????
????A/B ?????????????????? http://www.evanmiller.org/ab-testing/sample-size.html
???????? 3. ?????????
??????????????μ????????????????????
??????? GA ???? A/B ?????????????
????http://biasedbit.com/ab-testing-jekyll-ga/
???????粻??????Щ??????? A/B ?????????????????????????????????????????????????????Ч????????????????????
??????????????????????????????????????ж?????????????????????????????????????????
??????????Щ??忴????????????????????????????????????????? :)
?????? A/B ?????????????????????
????A/B ??????????????????????????????飬????????t???????? A???????????μ??????? B (??????????)?????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
?????? A/B ????????????
????1. ???????????? 2 ?????
????2. ?μ??????????????????
??????????Ч???????? epsilon-greedy ??????
??????????? 10% ???????????90% ???????????????????
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.
????Epsilon-greedy ?????????????????????????????????????ü??????????????????? bitly ????? epsilon-greedy ?????ü?????????????
??????????????????????????? 2 ?????????????????????????????????????????????????????????????????????
?????????????????? A/B ????????????????????????????????????
???????????????Щ??????????????????????????????????????????С??????????????????????????????????????????????????????????????????????????????????????????á?