Code Monkey home page Code Monkey logo

linconts's Introduction

Thompson Sampling for Linearly Constrained Bandits

Overview

This repository contains the code for running the simulations and generating the plots reported in the following paper:

Saxena V., Gonzalez J.E., Jaldén J., Thompson Sampling for Linearly Constrained Bandits, AISTATS 2020, Palmerno, Italy.

The code simulates two algorithms: LinConTS and LinCon-KL-UCB. Details and pseudocode of the algorithms are available in the paper. Two real-world datasets are considered, which are included under the datasets/ directory and are also available for download here:

  1. Coupon-purchase
  2. edX-course

Dependencies

The code runs on Jupyter Notebook running a Python3 kernel. Further, the code depeds on the following libraries:

  1. CVXOPT for solving a linear program in each step of the algorithm.
  2. Ray for distributing parallel runs over multiple cores within a compute cluster.

Running the Experiments

The experiments can be run by executing each cell in the 'LinConTS_coupon' and 'LinConTS-edX' notebooks. The results are stored to the disk as Numpy arrays.

Plotting

The results for each of the simulated datasets are plotted with the 'LinConTS_plots' notebook. Make sure to correctly specify the location of the result dataset (as a Numpy array) in the appropriate cell.

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.