--- id: mabwiser version: "2.7.4" license: unclear license_treatment: permissive maintenance: dormant --- # mabwiser — MABWiser: Parallelizable Contextual Multi-Armed Bandits Library License: permissive · Maintenance: dormant · Downloads: 99.3K/mo ## 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 above — 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 pip install mabwiser uv add mabwiser 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 99.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags multi-armed bandit algorithms, contextual bandit library, exploration-exploitation tradeoff, reinforcement learning bandits, bandit policy optimization, arm selection learning, thompson sampling UCB1, reinforcement-learning, decision-optimization, research-library [View on SkillFed](https://skillfed.io/packages/mabwiser) · [View on PyPI](https://pypi.org/project/mabwiser/)