Coder Social home page Coder Social logo

bilkent-cyborg / acc-ucb Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 1.0 57.09 MB

Implementation of the Adaptive Contextual Combinatorial Upper Confidence Bound (ACC-UCB) algorithm for the contextual combinatorial volatile multi-armed bandit setting.

Python 100.00%
multiarmed-bandits reinforcement-learning contextual-bandit combinatorial-bandit

acc-ucb's Introduction

ACC-UCB

Implementation of the Adaptive Contextual Combinatorial Upper Confidence Bound (ACC-UCB) algorithm for the contextual combinatorial volatile multi-armed bandit setting.

How to run

First, extract the "simulation_df" file from the "simulation_df.zip" file. Then, depending on the setting of the "use_generated_workers_in_paper" parameter in the "main.py" script, the script will either run the simulations using the arm-pairs used in the paper simulation (saved in the "simulation_df" file), or it will generate the arm-pairs (i.e., workers) from the Gowalla dataset as explained in the paper, and then run the simulations. In other words, by setting the "use_generated_workers_in_paper" to True, you will get the results presented in the paper.

Note that if you set "use_generated_workers_in_paper" to False and want to run the simulations from scratch, then the Gowalla checkins txt file must be downloaded to the same directory as the script and saved as "Gowalla_totalCheckins.txt". Then, the "gowallaLoader.py" script MUST BE RUN before the "main.py" file. The checkins txt file can be downloaded from the following link: https://snap.stanford.edu/data/loc-Gowalla.html.

Therefore, the "Gowalla_totalCheckins.txt" file is processed by the "gowallaLoader.py" script and saved as a DataFrame in a file called "gowalla_df". Then, the "gowalla_df" file is opened when running the simulations and from it, workers and tasks are generated. The generated arm-pairs are saved as a DataFrame in the "simulation_df" file and used in the simulations.

On the implementation of ACC_UCB

The implemented ACC-UCB class ONLY works when N=2 (i.e., binary tree of nodes/contexts). It will, however, work for any k-dimensional context, BUT v_1, v_2, \rho, and x_{0,1} must be rederived and updated in the "main.py" file.

Specs of the PC used for the paper

A PC with the following specs was used for the simulations whose results/figures are presented in the paper:

CPU: Intel Core i7-7700 @ 3.60 GHz | RAM: 32 GB | OS: Ubuntu 18.10

How to cite

Please cite this code as

A. Nika, S. Elahi and C. Tekin, "Contextual combinatorial volatile multi-armed bandit with adaptive discretization", to appear in 23rd International Conference on Artificial Intelligence and Statistics (AISTATS).

acc-ucb's People

Contributors

sepehr78 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mint-zhou

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.