Skip to main content

Taking the pain out of choosing a Python global optimizer

Project description

humpday derivative-free optimizers (docs and Elo ratings) tests nlopt ax-platform py-bobyqa dlib hyperopt pySOT skopthebo nevergrad nevergrad (GitHub) optuna bayesopt platypus pymoo ultraopt License: MIT

Deriv-free optimizers from many packages in a common syntax, with evaluation

  1. There's a colab notebook that recommends a black-box derivative-free optimizer for your objective function.

  2. About fifty strategies drawn from various open source packages are assigned Elo ratings depending on dimension of the problem and number of function evaluations allowed.

Hello and welcome to HumpDay, a package that helps you choose a Python global optimizer package, and strategy therein, from Ax-Platform, bayesian-optimization, DLib, HyperOpt, NeverGrad, Optuna, Platypus, PyMoo, PySOT, Scipy classic and shgo, Skopt, nlopt, Py-Bobyaq, UltraOpt and maybe others by the time you read this. It also presents some of their functionality in a common calling syntax.

Cite or be cited

Pull requests at CITE.md are welcome. If your package is benchmarked here I'd like to get this bit right.

Install

See INSTALL.md

Short version:

pip install humpday
pip install humpday[full]

Recommendations

Pass the dimensions of the problem, function evaluation budget and time budget to receive suggestions that are independent of your problem set,

    from pprint import pprint 
    from humpday import suggest
    pprint(suggest(n_dim=5, n_trials=130,n_seconds=5*60))

where n_seconds is the total computation budget for the optimizer (not the objective function) over all 130 function evaluations. Or simply pass your objective function, and it will time it and do something sensible:

    from humpday import recommend

    def my_objective(u):
        time.sleep(0.01)
        return u[0]*math.sin(u[1])

    recommendations = recommend(my_objective, n_dim=21, n_trials=130)

Points race

If you have more time, call points_race on a list of your own objective functions:

    from humpday import points_race
    points_race(objectives=[my_objective]*2,n_dim=5, n_trials=100)

See the colab notebook.

How it works

In the background, 50+ strategies are assigned Elo ratings by sister repo optimizer-elo-ratings. Oh I said that already. Never mind.

Contribute

By all means contribute more to optimizers.

Articles

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

humpday-0.7.1.tar.gz (45.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

humpday-0.7.1-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file humpday-0.7.1.tar.gz.

File metadata

  • Download URL: humpday-0.7.1.tar.gz
  • Upload date:
  • Size: 45.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for humpday-0.7.1.tar.gz
Algorithm Hash digest
SHA256 67b1c9e7744cd7ee77c46914795f1643b0fe5632e465d9695a6645071e4a8383
MD5 5996b622a963e2ac46588e0d7b7dd768
BLAKE2b-256 10a1e26c3ea5424dfa88ae300a5c2274c4be5ba02400b72f46312e1f3a503fdf

See more details on using hashes here.

File details

Details for the file humpday-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: humpday-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 64.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for humpday-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3dbb481245d3cb3a66f06af293a5990c883f6fbac302bb7cf21d635d0d6ce18b
MD5 a503db0bc4023a2b962035be628308c0
BLAKE2b-256 eb6b4c812c640525228ac17a9089792fdcccd16d8fc23c40fef919634d5b32c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page