I want to implement MAB(Multi arm bandit algorithm ) in python. There is a package called bandit in R Check here, is there anything similar to this in python


1 Answer 1

  • Check this one from a book on MAB

  • There's also a flaskimplementation if you want a web service

  • $\begingroup$ Bandit package takes 2 inputs trials and successes and based on that gives me a probability of success of a arm. I couldn't figure how to modify the code in the book to this. ( i am a newbie, a little help would be useful) $\endgroup$ Commented Mar 14, 2016 at 6:45
  • $\begingroup$ @karan please specifiy exactly what portion of the code you did not follow and an example of what you have tried out $\endgroup$
    – wabbit
    Commented Mar 14, 2016 at 6:59
  • $\begingroup$ The current implementation involves randomly choosing an arm and recording the reward. But my problem statement is - n ads are running with each of budget B. Now i want to re -distribute budget nB among n ads based on the success probability of ad. (prob can be calculated with revenue and trial metric of each ad) $\endgroup$ Commented Mar 14, 2016 at 7:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.