ampgo
Global optimization via adaptive memory programming with a scipy.optimize like API.
Installation
pip install ampgo
Example: Minimizing the six-hump camelback function in ampgo
import ampgo
def obj(x):
"""Six-hump camelback function"""
x1 = x[0]
x2 = x[1]
f = (4 - 2.1*(x1*x1) + (x1*x1*x1*x1)/3.0)*(x1*x1) + x1*x2 + (-4 + 4*(x2*x2))*(x2*x2)
return f
bounds = [(-5, 5), (-5, 5)]
res = ampgo.ampgo(obj, bounds)
print(res.x)
print(res.fun)
Documentation
For the full API reference check out the online documentation.
History
Coded by Andrea Gavana, andrea.gavana@gmail.com. Original hosted at https://code.google.com/p/ampgo/. Made available under the MIT licence. Usage and installation modified by Daniel Schmitz.
Differences compared to original version:
- Support all of SciPy's local minimizers
- Return a OptimizeResult class like SciPy's global optimizers
- Require bounds instead of starting point
- Jacobian and Hessian support
- Support all of NLopt's local minimizers (requires simplenlopt)
- Drop support for OpenOpt solvers as OpenOpt has been stale for several years
Metadata
Release files for ampgo 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ampgo-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for ampgo-1.0.1-py3-none-any.whl |
Release files / ampgo-1.0.1-py3-none-any.whl
| Download URL | ampgo-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb77991c63c6c63ed74a21633f49cb8ee0c49d75c0ecb417e22321d31dcd0c60
|
|
BLAKE2b-256 checksum How to use checksums |
6b59e039df30ae2402c4ad201fc5a0c1fcf61e96f5463b6771a368e92d067629
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for ampgo 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.