7 ms·
For the DIY crowd, implementing this on your own is a straightforward (and fun) exercise. I used the Javascript Bayesian Bandit library found here: https://gi
by orasis 12y ago
For the DIY crowd, implementing this on your own is a straightforward (and fun) exercise.
I used the Javascript Bayesian Bandit library found here:
https://github.com/omphalos/bayesian-bandit.js/blob/master/bayesian-bandit.js https://github.com/omphalos/bayesian-bandit.js/blob/master/b...
I then used it to create a job that runs every 5 minutes on parse.com that updates an 'order' field based on the 5 minute sample.
Then, from the client side, I simply do a query sorted by the 'order' field and I get the top variant for that 5 minute interval. Works like a charm!