skillfed

mabwiser

MABWiser: Parallelizable Contextual Multi-Armed Bandits Library

mabwiser v2.7.4 99.3K downloads/30d#13,031 on PyPI291
Permissive license DORMANT released

What it is and what it does

MABWiser is a research library for prototyping multi-armed bandit algorithms—a class of decision-making strategies that balance exploring new options against exploiting known good ones. It provides multiple learning policies (Epsilon Greedy, LinUCB, Thompson Sampling, UCB1, and others) and neighborhood policies (Clusters, K-Nearest, LSH Nearest, Radius, TreeBandit) to handle both simple arm-selection problems and contextual variants where decisions depend on feature data. The library follows scikit-learn conventions, includes a simulation utility for policy comparison and hyperparameter tuning, and supports parallelization across training and prediction.

The package is built on standard scientific Python dependencies (numpy, pandas, scikit-learn, scipy, joblib) and is maintained by Fidelity's AI Center of Excellence. It is used in downstream projects like Mab2Rec for personalized recommendations and ALNS for combinatorial optimization. The library is dormant—last release was 2024-08-30 with no active development—but remains stable for research and prototyping use.

Use it for:

  • Build a personalized recommendation system that learns which content to show each user by treating items as arms and user feedback as rewards.
  • Implement A/B testing or multi-variant testing where you need to dynamically allocate traffic to better-performing variants while still exploring.
  • Solve combinatorial optimization problems (e.g., vehicle routing, scheduling) by using bandits to select destroy-repair operations in a metaheuristic.
  • Prototype and compare different exploration-exploitation strategies on a decision problem before deploying to production.
  • Tune hyperparameters of bandit policies using the built-in simulation utility to find optimal settings for your reward structure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

MABWiser implements multi-armed bandit algorithms for decision-making under uncertainty, supporting context-free, parametric, and non-parametric contextual models with built-in parallelization for training and testing.

Yes, if you are prototyping or researching multi-armed bandit algorithms in Python. The library is stable, well-documented, has no known vulnerabilities, and low install friction. However, dormant maintenance means no active bug fixes or feature development—suitable for research and learning, less ideal if you need ongoing support or expect breaking changes in your dependencies.

Install

mabwiser on PyPI

pip

pip install mabwiser

uv

uv add mabwiser

poetry

poetry add mabwiser

Installing mabwiser

Before you install

Low friction: pure Python wheel with standard scientific dependencies (joblib, numpy, pandas, scikit-learn, scipy, seaborn). Last commit was 2024-09-05, but maintenance is dormant—no active development expected.

License in practice

Apache License 2.0 is permissive; you can use, modify, and distribute MABWiser freely in commercial and open-source projects with minimal restrictions.

Quickstart

from mabwiser.mab import MAB, LearningPolicy

arms = ['Arm1', 'Arm2']
mab = MAB(arms, LearningPolicy.UCB1(alpha=1.25))
mab.fit(['Arm1', 'Arm1', 'Arm2', 'Arm1'], [20, 17, 25, 9])
mab.predict()

Verify before relying

  • Whether the library actively supports Python versions beyond 3.8 despite classifier only listing 3.8
  • Current test coverage and whether heavy testing mentioned in description is still maintained
  • Whether parallelization features are production-ready or primarily research-oriented

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 6 — joblib, numpy, pandas, scikit-learn, scipy, seaborn
Maintenance dormant — 714 days since the last release
Last repo commit
First released
Downloads 99,270/month — #13,031 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mabwiser-2.7.4-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.8

Tags

multi-armed bandit algorithmscontextual bandit libraryexploration-exploitation tradeoffreinforcement learning banditsbandit policy optimizationarm selection learningthompson sampling UCB1
reinforcement-learningdecision-optimizationresearch-library

More Artificial Intelligence packages

Further reading