Python Practice
Let's get into modeling. We'll start by giving some recommendations for users using MABs.
Recommendations
For this example, we'll take joke preferences by users, and we'll use them to simulate feedback on recommended jokes on our website. We'll use this feedback to tune our recommendations. We want to select the 10 best jokes to present to people visiting our site. The recommendations are going to be produced by 10 MABs that each have as many arms as there are jokes.
This is adapted from an example from the mab-ranking
library on GitHub by Kenza-AI.
It's a handy library that comes with implementations of different bandits. I've simplified the installation of this library in my fork of the library, so we'll be using my fork here:
pip install git+https://github.com/benman1/mab-ranking
After this is finished, we can get right to it!
We'll download the jester
dataset with joke preferences from...