Adaptive Memory Programming for Global Optimization
Project description
ampgo
Global optimization via adaptive memory programming with a scipy.optimize like API.
Installation
git clone https://github.com/dschmitz89/ampgo
cd ampgo
pip install .
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
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
ampgo-1.0-py3-none-any.whl
(7.2 kB
view details)
File details
Details for the file ampgo-1.0-py3-none-any.whl
.
File metadata
- Download URL: ampgo-1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0d5ab6d00d24b1b6e9ac3a0f8496e1a0606eb968d5238dd920b677ea61c01b |
|
MD5 | 88b53bac2d3f45de35f8472c4f43616a |
|
BLAKE2b-256 | 6e0912b5dbf2004968fe0e4a0914fbaedb7e16ec4003030dc504ba9d70dbec75 |