PyXAB - A Python Library for $\mathcal{X}$-Armed Bandit and Online Blackbox Optimization Algorithms

PyXAB - A Python Library for $\mathcal{X}$-Armed Bandit and Online Blackbox Optimization Algorithms - Published in JOSS (2024)

https://github.com/williamlwj/pyxab

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, joss.theoj.org, zenodo.org
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

algorithm automl bandit-algorithms blackbox-optimization continuous-armed-bandit data-science hyperparameter-optimization hyperparameter-tuning lipschitz-bandit machine-learning machine-learning-algorithms online-learning optimization optimization-algorithms reinforcement-learning x-armed-bandit

Scientific Fields

Artificial Intelligence and Machine Learning Computer Science - 32% confidence
Last synced: 4 months ago · JSON representation ·

Repository

PyXAB - A Python Library for X-Armed Bandit and Online Blackbox Optimization Algorithms

Basic Info
Statistics
  • Stars: 126
  • Watchers: 17
  • Forks: 30
  • Open Issues: 4
  • Releases: 16
Topics
algorithm automl bandit-algorithms blackbox-optimization continuous-armed-bandit data-science hyperparameter-optimization hyperparameter-tuning lipschitz-bandit machine-learning machine-learning-algorithms online-learning optimization optimization-algorithms reinforcement-learning x-armed-bandit
Created almost 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

PyXAB - Python X-Armed Bandit

DOI badge DOI PyPI version Documentation Status Code style: black testing github-PyXAB forks github-PyXAB stars downloads github-PyXAB license Code style: black

PyXAB is a Python open-source library for X-armed bandit algorithms, a prestigious set of optimizers for online black-box optimization and hyperparameter optimization.

trajectory heatmap

PyXAB contains the implementations of 10+ optimization algorithms, including the classic ones such as Zooming, StoSOO, and HCT, and the most recent works such as GPO, StroquOOL and VHCT. PyXAB also provides the most commonly-used synthetic objectives to evaluate the performance of different algorithms and the implementations for different hierarchical partitions

PyXAB is featured for:

  • User-friendly APIs, clear documentation, and detailed examples
  • Comprehensive library of optimization algorithms, partitions and synthetic objectives
  • High standard code quality and high testing coverage
  • Low dependency for flexible combination with other packages such as PyTorch, Scikit-Learn

Reminder: The algorithms are maximization algorithms!

Quick Links

Quick Example

PyXAB follows a natural and straightforward API design completely aligned with the online blackbox optimization paradigm. The following is a simple 6-line usage example.

First, we define the parameter domain and the algorithm to run. At every round t, call algo.pull(t) to get a point and call algo.receive_reward(t, reward) to give the algorithm the objective evaluation (reward)

```python3 from PyXAB.algos.HOO import T_HOO

domain = [[0, 1]] # Parameter is 1-D and between 0 and 1 algo = THOO(rounds=1000, domain=domain) for t in range(1000): point = algo.pull(t) reward = 1 #TODO: User-defined objective returns the reward algo.receivereward(t, reward) ```

More detailed examples can be found here

Documentations

Installation

To install via pip, run the following lines of code bash pip install PyXAB # normal install pip install --upgrade PyXAB # or update if needed

To install via git, run the following lines of code bash git clone https://github.com/WilliamLwj/PyXAB.git cd PyXAB pip install .

Features:

X-armed bandit algorithms

  • Algorithm starred are meta-algorithms (wrappers)

| Algorithm | Research Paper | Year | |-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------| | Zooming | Multi-Armed Bandits in Metric Spaces | 2008 | | T-HOO | X-Armed Bandit | 2011 | | DOO | Optimistic Optimization of a Deterministic Function without the Knowledge of its Smoothness | 2011 | | SOO | Optimistic Optimization of a Deterministic Function without the Knowledge of its Smoothness | 2011 | | StoSOO | Stochastic Simultaneous Optimistic Optimization | 2013 | | HCT | Online Stochastic Optimization Under Correlated Bandit Feedback | 2014 | | POO* | Black-box optimization of noisy functions with unknown smoothness | 2015 | | GPO* | General Parallel Optimization Without A Metric | 2019 | | PCT | General Parallel Optimization Without A Metric | 2019 | | SequOOL | A Simple Parameter-free And Adaptive Approach to Optimization Under A Minimal Local Smoothness Assumption | 2019 | | StroquOOL | A Simple Parameter-free And Adaptive Approach to Optimization Under A Minimal Local Smoothness Assumption | 2019 | | VROOM | Derivative-Free & Order-Robust Optimisation | 2020 | | VHCT | Optimum-statistical Collaboration Towards General and Efficient Black-box Optimization | 2023 | | VPCT | N.A. (GPO + VHCT) | N.A. |

Hierarchical partition

| Partition | Description | |-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| | BinaryPartition | Equal-size binary partition of the parameter space, the split dimension is chosen uniform randomly | | RandomBinaryPartition | Random-size binary partition of the parameter space, the split dimension is chosen uniform randomly | | DimensionBinaryPartition | Equal-size partition of the space with a binary split on each dimension, the number of children of one node is 2^d | | KaryPartition | Equal-size K-ary partition of the parameter space, the split dimension is chosen uniform randomly | | RandomKaryPartition | Random-size K-ary partition of the parameter space, the split dimension is chosen uniform randomly |

Synthetic objectives

| Objectives | Image | | --- |--- | | Garland | Garland | | DoubleSine | DoubleSine | | DifficultFunc | DifficultFunc | | Ackley | Ackley | | Himmelblau | Himmelblau | | Rastrigin | Rastrigin |

Contributing

We appreciate all forms of help and contributions, including but not limited to

  • Star and watch our project
  • Open an issue for any bugs you find or features you want to add to our library
  • Fork our project and submit a pull request with your valuable codes

Please read the contributing instructions before submitting a pull request.

Citations

If you use our package in your research or projects, we kindly ask you to cite our work

text @article{Li2023PyXAB, doi = {10.21105/joss.06507}, url = {https://joss.theoj.org/papers/10.21105/joss.06507}, author = {Li, Wenjie and Li, Haoze and Song, Qifan and Honorio, Jean}, title = {PyXAB -- A Python Library for $\mathcal{X}$-Armed Bandit and Online Blackbox Optimization Algorithms}, journal={Journal of Open Source Software}, year = {2024}, issn={2475-9066}, }

We would also appreciate it if you could cite our related works.

text @article{li2023optimumstatistical, title={Optimum-statistical Collaboration Towards General and Efficient Black-box Optimization}, author={Wenjie Li and Chi-Hua Wang and Guang Cheng and Qifan Song}, journal={Transactions on Machine Learning Research}, issn={2835-8856}, year={2023}, url={https://openreview.net/forum?id=ClIcmwdlxn}, note={} }

```text

@article{Li2022Federated, title={Federated $\chi$-armed Bandit}, volume={38}, url={https://ojs.aaai.org/index.php/AAAI/article/view/29267}, DOI={10.1609/aaai.v38i12.29267}, number={12}, journal={Proceedings of the AAAI Conference on Artificial Intelligence}, author={Li, Wenjie and Song, Qifan and Honorio, Jean and Lin, Guang}, year={2024}, month={Mar.}, pages={13628-13636}

} ```

```text

@InProceedings{Li2024Personalized, title = {Personalized Federated $\chi$-armed Bandit}, author = {Li, Wenjie and Song, Qifan and Honorio, Jean}, booktitle = {Proceedings of The 27th International Conference on Artificial Intelligence and Statistics}, pages = {37--45}, year = {2024}, editor = {Dasgupta, Sanjoy and Mandt, Stephan and Li, Yingzhen}, volume = {238}, series = {Proceedings of Machine Learning Research}, month = {02--04 May}, publisher = {PMLR}, pdf = {https://proceedings.mlr.press/v238/li24a/li24a.pdf}, url = {https://proceedings.mlr.press/v238/li24a.html}, } ```

Owner

  • Name: William
  • Login: WilliamLwj
  • Kind: user

JOSS Publication

PyXAB - A Python Library for $\mathcal{X}$-Armed Bandit and Online Blackbox Optimization Algorithms
Published
October 24, 2024
Volume 9, Issue 102, Page 6507
Authors
Wenjie Li[ ORCID
Department of Statistics, Purdue University, USA
Haoze Li
Department of Statistics, Purdue University, USA
Qifan Song
Department of Statistics, Purdue University, USA
Jean Honorio
School of Computing and Information Systems, The University of Melbourne, Australia
Editor
Vincent Knight ORCID
Tags
$\mathcal{X}$-Armed Bandit Online Blackbox Optimization Lipschitz Bandit

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Li
  given-names: Wenjie
  orcid: "https://orcid.org/0000-0003-1872-4595"
- family-names: Li
  given-names: Haoze
- family-names: Song
  given-names: Qifan
- family-names: Honorio
  given-names: Jean
contact:
- family-names: Li
  given-names: Wenjie
  orcid: "https://orcid.org/0000-0003-1872-4595"
doi: 10.5281/zenodo.13963754
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Li
    given-names: Wenjie
    orcid: "https://orcid.org/0000-0003-1872-4595"
  - family-names: Li
    given-names: Haoze
  - family-names: Song
    given-names: Qifan
  - family-names: Honorio
    given-names: Jean
  date-published: 2024-10-24
  doi: 10.21105/joss.06507
  issn: 2475-9066
  issue: 102
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 6507
  title: PyXAB - A Python Library for \\mathcal{X}-Armed Bandit and
    Online Blackbox Optimization Algorithms
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.06507"
  volume: 9
title: PyXAB - A Python Library for $\mathcal{X}$-Armed Bandit and
  Online Blackbox Optimization Algorithms

GitHub Events

Total
  • Release event: 1
  • Watch event: 7
  • Issue comment event: 1
  • Push event: 18
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 7
  • Issue comment event: 1
  • Push event: 18
  • Pull request event: 2
  • Fork event: 2
  • Create event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 319
  • Total Committers: 4
  • Avg Commits per committer: 79.75
  • Development Distribution Score (DDS): 0.185
Past Year
  • Commits: 31
  • Committers: 2
  • Avg Commits per committer: 15.5
  • Development Distribution Score (DDS): 0.065
Top Committers
Name Email Commits
WilliamLi w****j@g****m 260
talhz t****z@p****n 49
Giggfitnesse l****9@p****u 8
crvernon c****n@g****m 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 18
  • Total pull requests: 20
  • Average time to close issues: 9 days
  • Average time to close pull requests: about 12 hours
  • Total issue authors: 4
  • Total pull request authors: 4
  • Average comments per issue: 0.44
  • Average comments per pull request: 0.7
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 1 hour
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 2.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • WilliamLwj (13)
  • Giggfitnesse (2)
  • talmiller2 (1)
  • KBodolai (1)
Pull Request Authors
  • talhz (10)
  • Giggfitnesse (5)
  • WilliamLwj (4)
  • crvernon (2)
Top Labels
Issue Labels
enhancement (5) help wanted (4) good first issue (3) documentation (3) bug (2) invalid (1)
Pull Request Labels
enhancement (12) bug (2) documentation (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 33 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 17
  • Total maintainers: 1
pypi.org: pyxab

PyXAB - A Python Library for X-Armed Bandit and Online Blackbox Optimization Algorithms.

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 33 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 8.5%
Stargazers count: 13.3%
Forks count: 13.6%
Average: 14.5%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/testing.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v3 composite
docs/requirements.txt pypi
  • ipython >=4.1.1
  • matplotlib >=3.4.3
  • nbsphinx >=0.8.12
  • numpy >=1.20.3
  • pandoc >=2.3
  • scikit-learn >=0.24.2
  • sphinx-panels >=0.6.0
  • sphinx_gallery >=0.11.1