Coder Social home page Coder Social logo

bandits's Introduction

Cascading bandits

This is an implementation of the two MAB algorithms from the paper: Cascading Bandits for Large-Scale Recommendation Problems by Shi Zong, Hao Ni, Kenny Sung, Nan Rosemary Ke, Zheng Wen, Branislav Kveton

Logic

Picture credits

The main idea is Explorer :D This is a class, that basically runs the MAB a few rounds and gathers the results. It also saves them into the experiment folder (don't worry, no need to create such a folder. It will be created in the first run). Also, it is fairly customizable, so you can play with it.

Data

The main data used to develop this library was MovieLens dataset. This dataset is also expected to run with default play.py. If you want to change it to something else, by all means, do it. Remember to adjust the data information in config.py

If you want to understand the idea of Cascade bandits deeper, please refer to the paper.

How it works

Make changes to the congif.py file, specifying the path to the dataset, bandits, and so on. Then, you can run the following commands:

  1. make run - runs play.py. This is the main script to run two bandit algorithms CascadeLinTS and CascadeLinUBC against each other.
  2. make test - runs pytest
  3. make test-cov - runs test coverage

Output

The make run command will create the folder experiment/<date&time>, where you can find:

  • cumulative reward for each bandit (plot below)
  • general info about the explorer and bandits parameters
  • experiment results (basically mean regret for algorithms :D)

This is a project for fun, so any input is highly appreciated. Also, if you found something interesting or want to chat about MAB don't hesitate to reach out at [email protected]

bandits's People

Contributors

milakyr avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.