Skip to main content

PyPI license issues build docs coverage

mabby is a library for simulating multi-armed bandits (MABs), a resource-allocation problem and framework in reinforcement learning. It allows users to quickly yet flexibly define and run bandit simulations, with the ability to:

  • choose from a wide range of classic bandit algorithms to use
  • configure environments with custom arm spaces and rewards distributions
  • collect and visualize simulation metrics like regret and optimality

Installation

Prerequisites: Python 3.9+ and pip

Install mabby with pip:

pip install mabby

Basic Usage

The code example below demonstrates the basic steps of running a simulation with mabby. For more in-depth examples, please see the Usage Examples section of the mabby documentation.

import mabby as mb

# configure bandit arms
bandit = mb.BernoulliArm.bandit(p=[0.3, 0.6])

# configure bandit strategy
strategy = mb.strategies.EpsilonGreedyStrategy(eps=0.2)

# setup simulation
simulation = mb.Simulation(bandit=bandit, strategies=[strategy])

# run simulation
stats = simulation.run(trials=100, steps=300)

# plot regret statistics
stats.plot_regret()

Contributing

Please see CONTRIBUTING for more information.

License

This software is licensed under the Apache 2.0 license. Please see LICENSE for more information.

Metadata

Release files for mabby 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mabby 0.1.2
File Size Uploaded Provenance Actions
mabby-0.1.2.tar.gz 16.1 kB Without provenance Details for mabby-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mabby 0.1.2
File Interpreter ABI Platform Actions
mabby-0.1.2-py3-none-any.whl Python 3 none any Details for mabby-0.1.2-py3-none-any.whl

Total release size: 36.2 kB

Release files / mabby-0.1.2.tar.gz

Download URL mabby-0.1.2.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4f40835eed6af465285f38b21df060f53191a08c388898646c232deacaf252d5
BLAKE2b-256 checksum
How to use checksums
d791e2eaad9eaf64b1af0e6cd5f5c47f159babb8f481a849a9f15f3e36270084
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Darwin/22.1.0

Release files / mabby-0.1.2-py3-none-any.whl

Download URL mabby-0.1.2-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f7b22299558087cf4c0e724e4f1c1328dfb2f785530380df5cc6e4119c75526
BLAKE2b-256 checksum
How to use checksums
de5dc0b1f334c8dc1125d67d8f115643b06bac2597948d04d92767242a34137e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.13 Darwin/22.1.0

Security for mabby 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page