Taking the pain out of choosing a Python global optimizer
Project description
Humpday: Pure Python or Javascript Derivative-Free Optimization
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a451925945f40e683b78446d43da3f317e2e07c279e1dbccf32e135643478780
|
|
| MD5 |
c762e6f08c3f7391f156ed07d2b849cb
|
|
| BLAKE2b-256 |
fa33d1ca58dae37584a32559cd506e8c10e98fd34ebbe0ad312432c36fbc606e
|
Provenance
The following attestation bundles were made for humpday-0.10.0.tar.gz:
Publisher:
publish.yml on microprediction/humpday
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
humpday-0.10.0.tar.gz -
Subject digest:
a451925945f40e683b78446d43da3f317e2e07c279e1dbccf32e135643478780 - Sigstore transparency entry: 1634545363
- Sigstore integration time:
-
Permalink:
microprediction/humpday@23ff156e6511c6ae364e6601129133d643839553 -
Branch / Tag:
refs/tags/v0.10.0 - Owner: https://github.com/microprediction
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23ff156e6511c6ae364e6601129133d643839553 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ace401f119457909439b7cae41090d9b2d2bcc74fd8b3a508b491c1fed9584
|
|
| MD5 |
dc0fa01ff009c588cf038a8e9402c349
|
|
| BLAKE2b-256 |
b7597a0c56af71861f12da56e5aa765bfa7acc5dfb9488b44bb681304970b65f
|
Provenance
The following attestation bundles were made for humpday-0.10.0-py3-none-any.whl:
Publisher:
publish.yml on microprediction/humpday
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
humpday-0.10.0-py3-none-any.whl -
Subject digest:
c9ace401f119457909439b7cae41090d9b2d2bcc74fd8b3a508b491c1fed9584 - Sigstore transparency entry: 1634545466
- Sigstore integration time:
-
Permalink:
microprediction/humpday@23ff156e6511c6ae364e6601129133d643839553 -
Branch / Tag:
refs/tags/v0.10.0 - Owner: https://github.com/microprediction
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23ff156e6511c6ae364e6601129133d643839553 -
Trigger Event:
release
-
Statement type: