A flexible derivative-free solver for (bound constrained) general objective minimization
Project description
Py-BOBYQA is a flexible package for solving bound-constrained general objective minimization, without requiring derivatives of the objective. It is a Python implementation of the BOBYQA algorithm by Powell. Py-BOBYQA is particularly useful when evaluations of the objective function are expensive and/or noisy.
More details about Py-BOBYQA can be found in our papers:
Coralia Cartis, Jan Fiala, Benjamina Marteau and Lindon Roberts, Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers, ACM Transactions on Mathematical Software, 45:3 (2019), pp. 32:1-32:41 [preprint]
Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, Escaping local minima with derivative-free methods: a numerical investigation, technical report, University of Oxford, (2018).
Please cite [1] when using Py-BOBYQA for local optimization, and [1,2] when using Py-BOBYQA’s global optimization heuristic functionality. For reproducibility of all figures, please feel free to contact the authors.
The original paper by Powell is: M. J. D. Powell, The BOBYQA algorithm for bound constrained optimization without derivatives, technical report DAMTP 2009/NA06, University of Cambridge (2009), and the original Fortran implementation is available here.
If you are interested in solving least-squares minimization problems, you may wish to try DFO-LS, which has the same features as Py-BOBYQA (plus some more), and exploits the least-squares problem structure, so performs better on such problems.
Documentation
See manual.pdf or the online manual.
Citation
If you use Py-BOBYQA in a paper, please cite:
Cartis, C., Fiala, J., Marteau, B. and Roberts, L., Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers, ACM Transactions on Mathematical Software, 45:3 (2019), pp. 32:1-32:41.
If you use Py-BOBYQA’s global optimization heuristic, please cite the above and also
Cartis, C., Roberts, L. and Sheridan-Methven, O., Escaping local minima with derivative-free methods: a numerical investigation, technical report, University of Oxford, (2018).
Requirements
Py-BOBYQA requires the following software to be installed:
Python 2.7 or Python 3 (http://www.python.org/)
Additionally, the following python packages should be installed (these will be installed automatically if using pip, see Installation using pip):
NumPy 1.11 or higher (http://www.numpy.org/)
SciPy 0.18 or higher (http://www.scipy.org/)
Pandas 0.17 or higher (http://pandas.pydata.org/)
Optional package: Py-BOBYQA versions 1.2 and higher also support the trustregion package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. gfortran) and NumPy installed, then run pip install trustregion
. You do not have to have trustregion installed for Py-BOBYQA to work, and it is not installed by default.
Installation using pip
For easy installation, use pip as root:
$ [sudo] pip install Py-BOBYQA
or alternatively easy_install:
$ [sudo] easy_install Py-BOBYQA
If you do not have root privileges or you want to install Py-BOBYQA for your private use, you can use:
$ pip install --user Py-BOBYQA
which will install Py-BOBYQA in your home directory.
Note that if an older install of Py-BOBYQA is present on your system you can use:
$ [sudo] pip install --upgrade Py-BOBYQA
to upgrade Py-BOBYQA to the latest version.
Manual installation
Alternatively, you can download the source code from Github and unpack as follows:
$ git clone https://github.com/numericalalgorithmsgroup/pybobyqa $ cd pybobyqa
Py-BOBYQA is written in pure Python and requires no compilation. It can be installed using:
$ [sudo] pip install .
If you do not have root privileges or you want to install Py-BOBYQA for your private use, you can use:
$ pip install --user .
instead.
To upgrade Py-BOBYQA to the latest version, navigate to the top-level directory (i.e. the one containing setup.py
) and rerun the installation using pip
, as above:
$ git pull $ [sudo] pip install . # with admin privileges
Testing
If you installed Py-BOBYQA manually, you can test your installation by running:
$ python setup.py test
Alternatively, the HTML documentation provides some simple examples of how to run Py-BOBYQA.
Examples
Examples of how to run Py-BOBYQA are given in the online documentation, and the examples directory in Github.
Uninstallation
If Py-BOBYQA was installed using pip you can uninstall as follows:
$ [sudo] pip uninstall Py-BOBYQA
If Py-BOBYQA was installed manually you have to remove the installed files by hand (located in your python site-packages directory).
Bugs
Please report any bugs using GitHub’s issue tracker.
License
This algorithm is released under the GNU GPL license. Please contact NAG for alternative licensing.
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
File details
Details for the file Py-BOBYQA-1.2.tar.gz
.
File metadata
- Download URL: Py-BOBYQA-1.2.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df878e2546bb360cea6e1dc70d92529775218fba8ff561bf22d23dfd7334e696 |
|
MD5 | 46c548c7a57cae2b757719994e67f8cd |
|
BLAKE2b-256 | 080ff1611fad02a3720c57a4c8e2a263a714b92de3c233c734937eb540b2ea92 |