Skip to content

Commit

Permalink
Update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lindonroberts committed Apr 11, 2024
1 parent 7df0be4 commit 889bc7b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
17 changes: 9 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Py-BOBYQA is a flexible package for solving bound-constrained general objective
More details about Py-BOBYQA and its enhancements over BOBYQA can be found in our papers:

1. Coralia Cartis, Jan Fiala, Benjamin Marteau and Lindon Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers <https://doi.org/10.1145/3338517>`_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`arXiv preprint: 1804.00154 <https://arxiv.org/abs/1804.00154>`_]
2. Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization* (2021). [`arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>`_]
2. Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization*, 71:8 (2022), pp. 2343-2373. [`arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>`_]

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.

Expand All @@ -47,19 +47,19 @@ Cartis, C., Fiala, J., Marteau, B. and Roberts, L., Improving the Flexibility an

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, Optimization, (2021).
Cartis, C., Roberts, L. and Sheridan-Methven, O., Escaping local minima with derivative-free methods: a numerical investigation, Optimization, 71:8 (2022), pp. 2343-2373.

Requirements
------------
Py-BOBYQA requires the following software to be installed:

* Python 2.7 or Python 3 (http://www.python.org/)
* Python 3.8 or higher (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/)
* Optionally, Pandas 0.17 or higher (http://pandas.pydata.org/), to return the diagnostic information as a DataFrame
* NumPy (http://www.numpy.org/)
* SciPy (http://www.scipy.org/)
* Pandas (http://pandas.pydata.org/)

**Optional package:** Py-BOBYQA versions 1.2 and higher also support the `trustregion <https://github.com/lindonroberts/trust-region>`_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. `gfortran <https://gcc.gnu.org/wiki/GFortran>`_) and NumPy installed, then run :code:`pip install trustregion`. You do not have to have trustregion installed for Py-BOBYQA to work, and it is not installed by default.

Expand Down Expand Up @@ -125,11 +125,12 @@ To upgrade Py-BOBYQA to the latest version, navigate to the top-level directory
Testing
-------
If you installed Py-BOBYQA manually, you can test your installation by running:
If you installed Py-BOBYQA manually, you can test your installation using the pytest package:

.. code-block:: bash
$ python setup.py test
$ pip install pytest
$ python -m pytest --pyargs pybobyqa
Alternatively, the HTML documentation provides some simple examples of how to run Py-BOBYQA.

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ The upper and lower bounds on the variables are non-relaxable (i.e. Py-BOBYQA wi
Full details of the Py-BOBYQA algorithm are given in our papers:

1. Coralia Cartis, Jan Fiala, Benjamin Marteau and Lindon Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers <https://doi.org/10.1145/3338517>`_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`preprint <https://arxiv.org/abs/1804.00154>`_]
2. Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization* (2021). [`preprint <https://arxiv.org/abs/1812.11343>`_]
2. Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization*, 71:8 (2022), pp. 2343-2373. [`arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>`_]

Please cite [1] when using Py-BOBYQA for local optimization, and [1,2] when using Py-BOBYQA's global optimization heuristic functionality **(new in v1.1!)**.
Please cite [1] when using Py-BOBYQA for local optimization, and [1,2] when using Py-BOBYQA's global optimization heuristic functionality.

If you are interested in solving least-squares minimization problems, you may wish to try `DFO-LS <https://github.com/numericalalgorithmsgroup/dfols>`_, which has the same features as Py-BOBYQA (plus some more), and exploits the least-squares problem structure, so performs better on such problems.

Expand Down
13 changes: 7 additions & 6 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Requirements
------------
Py-BOBYQA requires the following software to be installed:

* `Python 2.7 or Python 3 <http://www.python.org/>`_
* Python 3.8 or higher (http://www.python.org/)

Additionally, the following python packages should be installed (these will be installed automatically if using `pip <http://www.pip-installer.org/>`_, see `Installation using pip`_):

* `NumPy 1.11 or higher <http://www.numpy.org/>`_
* `SciPy 0.18 or higher <http://www.scipy.org/>`_
* Optionally, `Pandas 0.17 or higher <https://pandas.pydata.org/>`_, to return the diagnostic information as a DataFrame
* NumPy (http://www.numpy.org/)
* SciPy (http://www.scipy.org/)
* Pandas (http://pandas.pydata.org/)

**Optional package:** Py-BOBYQA versions 1.2 and higher also support the `trustregion <https://github.com/lindonroberts/trust-region>`_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. `gfortran <https://gcc.gnu.org/wiki/GFortran>`_) and NumPy installed, then run :code:`pip install trustregion`. You do not have to have trustregion installed for Py-BOBYQA to work, and it is not installed by default.

Expand Down Expand Up @@ -71,11 +71,12 @@ To upgrade Py-BOBYQA to the latest version, navigate to the top-level directory
Testing
-------
If you installed Py-BOBYQA manually, you can test your installation by running:
If you installed Py-BOBYQA manually, you can test your installation using the pytest package:

.. code-block:: bash
$ python setup.py test
$ pip install pytest
$ python -m pytest --pyargs pybobyqa
Uninstallation
--------------
Expand Down
8 changes: 4 additions & 4 deletions docs/userguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Py-BOBYQA is designed to solve the local optimization problem
where the bound constraints :math:`a \leq x \leq b` are optional. The upper and lower bounds on the variables are non-relaxable (i.e. Py-BOBYQA will never ask to evaluate a point outside the bounds). The objective function :math:`f(x)` is usually nonlinear and nonquadratic. If you know your objective is linear or quadratic, you should consider a solver designed for such functions (see `here <https://neos-guide.org/Optimization-Guide>`_ for details).

Py-BOBYQA iteratively constructs an interpolation-based model for the objective, and determines a step using a trust-region framework.
For an in-depth technical description of the algorithm see the paper [CFMR2018]_, and for the global optimization heuristic, see [CRO2018]_.
For an in-depth technical description of the algorithm see the paper [CFMR2018]_, and for the global optimization heuristic, see [CRO2022]_.

How to use Py-BOBYQA
--------------------
Expand Down Expand Up @@ -402,12 +402,12 @@ The output of this is:
Warning (max evals): Objective has been called MAXFUN times
******************************
As we can see, the :code:`seek_global_minimum` flag helped Py-BOBYQA escape the local minimum from the first run, and find the global minimum. More details are given in [CRO2018]_.
As we can see, the :code:`seek_global_minimum` flag helped Py-BOBYQA escape the local minimum from the first run, and find the global minimum. More details are given in [CRO2022]_.

References
----------

.. [CFMR2018]
Coralia Cartis, Jan Fiala, Benjamin Marteau and Lindon Roberts, `Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers <https://doi.org/10.1145/3338517>`_, *ACM Transactions on Mathematical Software*, 45:3 (2019), pp. 32:1-32:41 [`preprint <https://arxiv.org/abs/1804.00154>`_]
.. [CRO2018]
Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization* (2021). [`preprint <https://arxiv.org/abs/1812.11343>`_]
.. [CRO2022]
Coralia Cartis, Lindon Roberts and Oliver Sheridan-Methven, `Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>`_, *Optimization*, 71:8 (2022), pp. 2343-2373. [`arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>`_]

0 comments on commit 889bc7b

Please sign in to comment.