Skip to main content

Taking the pain out of choosing a Python global optimizer

Project description

Humpday: Pure Python or Javascript Derivative-Free Optimization

CI License: MIT Python 3.9+

Documentation & Live Demos

22 derivative-free optimization algorithms in pure Python. No compilation, no required dependencies.

Install & Use

pip install humpday

Zero runtime dependencies. Every algorithm has a pure-Python implementation that works wherever Python runs.

If you want the numpy-accelerated backend for higher dimensions:

pip install humpday[fast]

The same algorithm code runs either way; humpday transparently uses numpy when it's available and falls back to pure Python when it isn't.

from humpday import minimize

def objective(x):
    return (x[0] - 2)**2 + (x[1] - 3)**2

result = minimize(objective, bounds=[(-5, 5), (-5, 5)], method='DifferentialEvolution')
print(f"Solution: {result.x}")  # [2.0, 3.0]

Algorithms

22 validated optimizers: See them in action | Source code

Trust region methods, evolutionary algorithms, metaheuristics.

Comparison

Marginal install footprint on top of a Python environment that already has numpy:

Library Adds on top of numpy Global optimizers
Humpday ~1 MB (or zero without [fast]) 22
SciPy ~100 MB 6 documented
Optuna ~30 MB 11 samplers
Nevergrad ~230 MB 540+ registered (tuned variants of ~30 base methods)

Humpday's niche: when you need optimization that works anywhere Python runs, without dependencies or compilation.

License

MIT - Use freely in commercial and research projects.

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.10.0.tar.gz (4.0 MB view details)

Uploaded Source

Built Distribution

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

humpday-0.10.0-py3-none-any.whl (95.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: humpday-0.10.0.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for humpday-0.10.0.tar.gz
Algorithm Hash digest
SHA256 a451925945f40e683b78446d43da3f317e2e07c279e1dbccf32e135643478780
MD5 c762e6f08c3f7391f156ed07d2b849cb
BLAKE2b-256 fa33d1ca58dae37584a32559cd506e8c10e98fd34ebbe0ad312432c36fbc606e

See more details on using hashes here.

Provenance

The following attestation bundles were made for humpday-0.10.0.tar.gz:

Publisher: publish.yml on microprediction/humpday

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: humpday-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 95.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for humpday-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9ace401f119457909439b7cae41090d9b2d2bcc74fd8b3a508b491c1fed9584
MD5 dc0fa01ff009c588cf038a8e9402c349
BLAKE2b-256 b7597a0c56af71861f12da56e5aa765bfa7acc5dfb9488b44bb681304970b65f

See more details on using hashes here.

Provenance

The following attestation bundles were made for humpday-0.10.0-py3-none-any.whl:

Publisher: publish.yml on microprediction/humpday

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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