Skip to main content

ilovebandits

ilovebandits is a high-level Python package to work with contextual and multiarmed bandits with new released algorithms. In essence, this package adds novel ensemble of trees techniques for contextual bandits that the industry demands and that are not currently available in other places.

This package was born due to the need of having more advanced bandit algorithms and features for the finance industry.

Next version will also add the concept of composed rewards where you can feed the bandit with different type rewards in time as this was a requirement that a lot of problems face.

The implementation has been developed in Python 3. We are currently in the first version focusing on adding more core features and collecting feedback from the community.

Installation

Installation/Usage: Installation/Usage details in official docs

Documentation

Documentation: Official documentation of the project in readthedocs

Tutorial

Tutorial contextual bandits: Tutorial and examples contextual bandits

Tutorial multi-armed bandits: Tutorial and exmaples multi-armed bandits

Motivation

There are a lot of potential business problems that can be solved with bandits, but current implementations lack some features that can be very useful to apply bandits in new scenarios. The main goal of this package is to provide a simple and easy-to-use interface to work with bandits, while also providing some advanced features that are not available in other packages.

Main industry limitations that this package addresses:

  1. Advanced contextual bandits with ensembles of trees There are not many implementations of advanced contextual bandits that allow the use of ensemble-of-trees methods. This is a limitation because ensemble methods are very powerful for tabular data. They need less data than neural networks and can capture richer patterns than the common linear methods employed in bandits.

  2. Ability to define composed rewards In many real-world scenarios, the reward is not a single value but a combination of different sub-rewards that can be observed at different times. For example, in a recommendation system, the final reward can be a combination of immediate clicks, time spent on the platform, and long-term user retention. Being able to define and use these sub-rewards can significantly improve the performance of the bandit algorithm, and we can also update the bandit more often for each subpart as soon as it comes.


This package concentrates on

  1. The use of ensemble-of-trees methods for contextual bandits.
  2. The use of composed rewards where the bandit can be fed with different types of sub-rewards in time. Here, we define a long-term global reward, which we break down into smaller, shorter-term rewards that allow us to update the bandit much earlier than if we waited for the global reward.

These small updates also change the global reward estimate employed by the bandit to take the final decision.


This package is intended to provide a quick, as well as (hopefully) easy-to-understand, way of running bandit simulations and core functions to create ready-to-use solutions for the industry.

Metadata

Release files for ilovebandits 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 ilovebandits 0.1.2
File Size Uploaded
ilovebandits-0.1.2.tar.gz 96.1 kB Details

Built distribution (wheel)

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

Total release size: 139.3 kB

Release files / ilovebandits-0.1.2.tar.gz

Download URL ilovebandits-0.1.2.tar.gz
Size 96.1 kB
Tags Source
SHA-256 checksum
How to use checksums
92d2a0f3e0b6e5bf5c72a1d7a067f92aa73c62b08440f0da044f0a2ab1c194cf
BLAKE2b-256 checksum
How to use checksums
6219ebae98f2144d665edf457eef056051e358889c1917f8c331c023d69c318e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.

Transparency log

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

Download URL ilovebandits-0.1.2-py3-none-any.whl
Size 43.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f349078da3537fec93eb25304cf02dbd12480d93399098d43f275e0fe19d332
BLAKE2b-256 checksum
How to use checksums
22a0828383da9d7051b5e1973e610ceb475a7b78cb567a70ccde278b637129b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

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