Coder Social home page Coder Social logo

drts's Introduction

Doubly Robust Thompson Sampling with Linear Payoffs

Python3 based implementation of the paper "Doubly Robust Thompson Sampling with linear payoffs". In this repository, you can generate Figures of the paper!

Directory tree

.
|-- experiment.py
|-- plot.py
|-- algorithms.py
|-- figure1.sh
|-- requirements.txt
|-- README.md
  • algorithms.py contains the Thompson Sampling (TS), Balanced Linear Thompson Sampling (BLTS), and the proposed Doubly Robust Thompson Sampling (DRTS).
  • experiment.py contains the simulation environments and evaluation of cumulative regrets and estimation error.
  • plot.py plots the results generated by experiment.py
  • figure1.sh contains a quick start that reproduces the result in the paper.
  • requirements.txt contains the dependencies to run the codes.

Requirements

  • python 3
  • numpy
  • scipy
  • sobol_seq
  • matplotlib
  • tqdm

Quick start

First to install the dependencies,

pip install -r requirements.txt

To generate Figure 1 in the paper simply run,

sh figure1.sh

This code will generate the cumulative regrets and estimation error plots of TS, BLTS, and DRTS, when d=10, 30, and N=3, 10.

If you want to change the settings, use

python experiment.py -d 5 -N 7 -seed 1324 -T 10000

to evaluate performances of the three algorithms for T=10000 rounds when d=5, and N=7, with seed 1324.

After running experiment.py, the estimation error and cumulative regrets are saved in .txt format. Then run

python plot.py -d 5 -N 7

to plot the results of d=5, and N=7.

Example results

We introduce our example results in our paper.

Figure 1. Comparison of cumulative regrets with best hyperparameters.

drawing

drawing

drawing

drawing

Figure 2. Comparison of estimation error with best hyperparameters

drawing

drawing

drts's People

Contributors

gisoo1989 avatar

Stargazers

Jyotishka Ray Choudhury avatar Xueqing Liu avatar Seyoon Ko avatar Yongchan Kwon avatar

Watchers

James Cloos avatar  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.