noisyopt

Python library for optimization of noisy functions


Keywords
optimization
License
MIT
Install
pip install noisyopt==0.1.1

Documentation

License Latest release Py2.7/3.x JOSS DOI

Status Build Status Documentation Status Coverage Status

noisyopt

Python library for optimization of noisy functions.

Currently the following algorithms are implemented:

  • robust pattern search with adaptive sampling
  • simultaneous perturbation stochastic approximation Both algorithms support bound constraints and do not require to explicitely calculate the gradient of the function.

We do not attempt to find global optima -- look at scikit-optimize for Bayesian optimization algorithms aimed at finding global optima to noisy optimization problems. For optimizing functions that are not noisy take a look at scipy.optimize.

Installation

Noisyopt is on PyPI so you can install it using pip install noisyopt.

Alternatively you can install it from source by obtaining the source code from Github and then running python setup.py install in the main directory. If you install from source, you first need to install numpy and scipy if these packages are not already installed.

Getting started

Find the minimum of the noisy function obj(x) with noisyopt:

import numpy as np
from noisyopt import minimizeCompass

def obj(x):
    return (x**2).sum() + 0.1*np.random.randn()

bounds = [[-3.0, 3.0], [0.5, 5.0]]
x0 = np.array([-2.0, 2.0])
res = minimizeCompass(obj, bounds=bounds, x0=x0, deltatol=0.1, paired=False)

Documentation

You can access the documentation online at Read the docs. If you install from source you can generate a local version by running make html from the doc directory.

Support and contributing

For bug reports and enhancement requests use the Github issue tool, or (even better!) open a pull request with relevant changes. If you have any questions don't hesitate to contact me by email (andisspam@gmail.com) or Twitter (@andisspam).

You can run the testsuite using the py.test testing framework py.test.

You are cordially invited to contribute to the further development of noisyopt!