All Projects → VowpalWabbit → coba

VowpalWabbit / coba

Licence: BSD-3-Clause license
Contextual bandit benchmarking

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to coba

aws-lambda-decorators
A set of Python decorators to simplify AWS lambda development
Stars: ✭ 19 (-34.48%)
Mutual labels:  python-package
gitea-auto-update
A script which can update gitea via crontab automatically to a new version.
Stars: ✭ 25 (-13.79%)
Mutual labels:  python-package
teanaps
자연어 처리와 텍스트 분석을 위한 오픈소스 파이썬 라이브러리 입니다.
Stars: ✭ 91 (+213.79%)
Mutual labels:  python-package
cpython
Alternative StdLib for Nim for Python targets, hijacks Python StdLib for Nim
Stars: ✭ 75 (+158.62%)
Mutual labels:  python-package
logya
Logya is a static site generator written in Python designed to be easy to use and flexible.
Stars: ✭ 16 (-44.83%)
Mutual labels:  python-package
lnurl
LNURL implementation for Python.
Stars: ✭ 51 (+75.86%)
Mutual labels:  python-package
python-package-boilerplate
Boilerplate for a Python Package
Stars: ✭ 75 (+158.62%)
Mutual labels:  python-package
partial dependence
Python package to visualize and cluster partial dependence.
Stars: ✭ 23 (-20.69%)
Mutual labels:  python-package
aotools
A useful set of tools for Adaptive Optics in Python
Stars: ✭ 60 (+106.9%)
Mutual labels:  python-package
cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-27.59%)
Mutual labels:  python-package
rom-operator-inference-Python3
Operator Inference for data-driven, non-intrusive model reduction of dynamical systems.
Stars: ✭ 31 (+6.9%)
Mutual labels:  python-package
ISS Info
Python wrapper for tracking information about International Space Station via http://open-notify.org
Stars: ✭ 12 (-58.62%)
Mutual labels:  python-package
geonamescache
geonamescache - a Python library for quick access to a subset of GeoNames data.
Stars: ✭ 76 (+162.07%)
Mutual labels:  python-package
cookiecutter-pypackage-pythonic
Pythonic cookiecutter template for a Python package. See https://github.com/audreyr/cookiecutter.
Stars: ✭ 29 (+0%)
Mutual labels:  python-package
T-Reqs
T-Reqs is a multi-language requirements file generator which also serves the purpose of preparing a template Dockerfile for working with Docker applications.
Stars: ✭ 18 (-37.93%)
Mutual labels:  python-package
python-package-template
Easy to use template for great PyPi packages
Stars: ✭ 19 (-34.48%)
Mutual labels:  python-package
SiEPIC Photonics Package
A Python (v3.6.5) package that provides a set of basic functions commonly used in integrated photonics.
Stars: ✭ 22 (-24.14%)
Mutual labels:  python-package
pyGinit
A simple github automation cli
Stars: ✭ 15 (-48.28%)
Mutual labels:  python-package
multi-imbalance
Python package for tackling multi-class imbalance problems. http://www.cs.put.poznan.pl/mlango/publications/multiimbalance/
Stars: ✭ 66 (+127.59%)
Mutual labels:  python-package
cuba-weather-python
Application programming interface of the Cuba Weather project implemented in Python
Stars: ✭ 17 (-41.38%)
Mutual labels:  python-package

codecov badge Documentation Status

Coba

What is it?

Coba is a powerful framework built to facilitate research with online contextual bandit (CB) algorithms.

Documentation

To start using Coba right away we recommend visiting our documentation.

How do you research?

Think for a second about the last time you considered evaluating CB methods for a research project

  1. Was it easy to incorporate your own data sets during CB analysis?
  2. Was it easy to incorporate the wide array of available CB algorithms?
  3. Was it easy to create, run and share the results of CB experiments?

Coba was built from the ground up to do these three things and more.

The Coba Way

Coba is...

  • ... light-weight (there are minimal project dependencies to get started)
  • ... verbose (sophisticated logging is built-in for meaningful, readable feedback on log running jobs)
  • ... robust (results are frequently saved to disk so that no work is lost if research is interrupted for any reason)
  • ... just-in-time (resources are only loaded when needed and are released quickly to keep resource requirements small)
  • ... a duck? (all code uses duck-typing so that inheritance is a non-issue when extending built-in functionality)

But don't take our word for it. We encourage you to look at the code yourself or read more below.

Workflow

Coba is architected around a simple workflow: Learners -> Environments -> Experiments -> Results -> Analysis.

Environments represent unique CB problems that need to be solved. Learners are the CB algorithms that we can use to learn policies. Experiments are combinations of Environments and Learners that we want to evaluate. And Results are the outcome of an Experiment, containing all the data from the Experiment.

Learners

Learners are algorithms which are able to improve their action selection through interactions with environments.

A number of algorithms are provided natively with Coba for quick comparsions. These include:

  • All contextual bandit learners in VowpalWabbit
  • UCB1-Tuned Bandit Learner by Auer et al. 2002
  • LinUCB by Chu et al. 2011
  • Corral by Agarwal et al. 2017

Environments

Environments are the core unit of evaluation in Coba. They are nothing more than a sequence of interactions with contexts, actions and rewards. A number of tools have been built into Coba to make simulation creation easier. All these tools are defined in the coba.environments module. We describe a few of these tools here.

Creating Environments From Classification Data Sets

Classification data sets are the easiest way to create Environments in Coba. Coba natively supports:

  • Binay, multiclass and multi-label problems
  • Dense and sparse representations
  • Openml, Csv, Arff, Libsvm, and the extreme classification (Manik) format
  • Local files and files over http (with local caching)

Creating Environments From Generative Functions

Sometimes we have well defined models that an agent has to make decisions within but no data. To support evaluation in these domains one can use LambdaSimulation to define generative functions to create an Environment.

Creating Environments From Scratch

If more customization is needed beyond what is offered above then you can easily create your own simulation by implementing Coba's simple SimulatedEnvironment interface.

Experiments

Experiments are combinations of Learners and Environments. The Experiment class orchestrates the complex tasks of evaluating learners on environments in a resource efficient, repeatable, and robust manner. Experiments can be run on any number of processes (we often run on 96 core machines) and writes all results to file as it runs so that it can be restarted if it ever stops.

Results

The end result of an Experiment is a Result object which has been built for easy analysis. The result class provides a number of plots as well as filtering capabilities out of the box. If the built in functionality isn't advanced enough data from experiments can be accesed directly from a three table structure: a Learner table, Environment table, and Interaction table. These tables can be ported to pandas dataframes where all manner of advanced filtering and plotting can be performed to discover the strengths and weaknesses of Learners on various Environments.

Examples

An examples directory is included in the repository with a number of code and experiment demonstrations. These examples show how to create experiments, evaluate learners against them and plot the results.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].