Giter Site home page Giter Site logo

tanguyurvoy / pmlib Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 1.8 MB

A python library for (finite) Partial Monitoring algorithms

License: GNU General Public License v3.0

Python 4.32% Jupyter Notebook 95.68%
machine-learning multi-armed-bandits dueling-bandits bandits partial-monitoring feedexp3 rex3

pmlib's Introduction

pmlib

A python library for (finite) Partial Monitoring algorithms

Partial monitoring

Partial Monitoring(PM) is a general framework for sequential decision making with imperfect feedback. PM generalizes a host of problems including for instance multi-armed bandits, prediction with expert advices, dynamic pricing, apple tasting, dark pools, label efficient prediction and dueling bandits.

Each problem is formalized by a couple of matrices and . At each step of the game, the learner chooses an action and the environment chooses an outome . gives the loss of action for outome and gives a (symbolic or numeric) feedback for this situation. The aim of the learner is to control her regret against an informed policy.

See N. Cesa-Bianchi, G. Lugosi "Prediction, Learning, and Games" 2006 on chapter 6 for an introduction: http://homes.dsi.unimi.it/~cesabian/predbook/

The library

We plan to add several generic PM algorithm, but the present version only includes FeedExp3 and its variants. See http://archive.cone.informatik.uni-freiburg.de/pubs/siim-tr-00-18.pdf or http://stoltz.perso.math.cnrs.fr/Publications/CBLS-pmonit.pdf

We also provide Rex3, an adhoc algorithm for dueling bandits: http://proceedings.mlr.press/v37/gajane15.html

The Function pmlib.problemClass(game) can analyze any game and provide its position in the PM complexity hierarchy as defined in (Bartok et al. "Partial monitoring โ€“ classification, regret bounds, and algorithms" 2013). This can be either:

  • TRIVIAL if a single action domines all others. It gives a constant regret.
  • EASY if all pairs of actions are globally observable and all neighbouring actions are locally observable. It gives a min-max regret in .
  • HARD if all pairs of actions are globally observable. It gives a min-max regret in .
  • INTRACTABLE if some pairs of actions are non globally observable.

Install guide

This library is based on the the Parma Polyhedra Library for the "Cell decomposition":

  • http://bugseng.com/products/ppl/
  • Reference: R. Bagnara et al.. "The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems." Science of Computer Programming, 72(1-2):3-21, 2008

You must intall this library and its python wrapper to use pmlib:

We also use numpy, scipy and pandas.

pmlib's People

Contributors

tanguyurvoy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mycoderepo2020

pmlib's Issues

Python "thread" Pool is not really thread safe

Sometimes the program will hang with this nasty comment:

Exception RuntimeError: RuntimeError('main thread is not in main loop',) in <bound method PhotoImage.__del__ of <Tkinter.PhotoImage instance at 0x7f58021bc6c8>> ignored Tcl_AsyncDelete: async handler deleted by the wrong thread

A safe, but slow, workaround is to use eval_policy(nbReps, horizon, pm_game, policy) instead of
eval_policy_parallel(nbCores, nbReps, horizon, pm_game, policy).

Tanguy

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.