Skip to content

Commit e6240a9

Browse files
committed
Initial commit of code and documentation
1 parent d179446 commit e6240a9

File tree

106 files changed

+29679
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+29679
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pyc
2+
*/__pycache__
3+
*.egg-info

LICENSE.txt

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.rst

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
==================================================================
2+
DFO-LS: Derivative-Free Optimizer for Least-Squares |PyPI Version|
3+
==================================================================
4+
DFO-LS is a flexible package for solving nonlinear least-squares minimisation, without requiring derivatives of the objective.
5+
6+
This is an implementation of the algorithm from our paper: C. Cartis, J. Fiala, B. Marteau and L. Roberts, Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers, technical report, University of Oxford, (2018).
7+
8+
Documentation
9+
-------------
10+
See manual.pdf or `here <http://people.maths.ox.ac.uk/robertsl/dfols>`_.
11+
12+
Requirements
13+
------------
14+
DFO-LS requires the following software to be installed:
15+
16+
* Python 2.7 or Python 3 (http://www.python.org/)
17+
18+
Additionally, the following python packages should be installed (these will be installed automatically if using *pip*, see `Installation using pip`_):
19+
20+
* NumPy 1.11 or higher (http://www.numpy.org/)
21+
* SciPy 0.18 or higher (http://www.scipy.org/)
22+
* Pandas 0.17 or higher (http://pandas.pydata.org/)
23+
24+
Installation using pip
25+
----------------------
26+
For easy installation, use *pip* (http://www.pip-installer.org/) as root::
27+
28+
$ [sudo] pip install dfols
29+
30+
or alternatively *easy_install*::
31+
32+
$ [sudo] easy_install dfols
33+
34+
If you do not have root privileges or you want to install DFO-LS for your private use, you can use::
35+
36+
$ pip install --user dfols
37+
38+
which will install DFO-LS in your home directory.
39+
40+
Note that if an older install of DFO-LS is present on your system you can use::
41+
42+
$ [sudo] pip install --upgrade dfols
43+
44+
to upgrade DFO-LS to the latest version.
45+
46+
Manual installation
47+
-------------------
48+
Alternatively, you can download the source code from `Github <https://github.com/numericalalgorithmsgroup/dfols>`_ and unpack as follows:
49+
50+
.. code-block:: bash
51+
52+
$ git clone https://github.com/numericalalgorithmsgroup/dfols
53+
$ cd dfols
54+
55+
DFO-LS is written in pure Python and requires no compilation. It can be installed using:
56+
57+
.. code-block:: bash
58+
59+
$ [sudo] pip install .
60+
61+
If you do not have root privileges or you want to install DFO-LS for your private use, you can use:
62+
63+
.. code-block:: bash
64+
65+
$ pip install --user .
66+
67+
instead.
68+
69+
Testing
70+
-------
71+
If you installed DFO-LS manually, you can test your installation by running:
72+
73+
.. code-block:: bash
74+
75+
$ python setup.py test
76+
77+
Alternatively, the HTML documentation provides some simple examples of how to run DFO-LS.
78+
79+
Examples
80+
--------
81+
Examples of how to run DFO-LS are given in the `documentation <http://people.maths.ox.ac.uk/robertsl/dfols>`_, and the `examples <https://github.com/numericalalgorithmsgroup/dfols/examples>`_ directory in Github.
82+
83+
Uninstallation
84+
--------------
85+
If DFO-LS was installed using *pip* you can uninstall as follows:
86+
87+
.. code-block:: bash
88+
89+
$ [sudo] pip uninstall dfols
90+
91+
If DFO-LS was installed manually you have to remove the installed files by hand (located in your python site-packages directory).
92+
93+
Bugs
94+
----
95+
Please report any bugs using GitHub's issue tracker.
96+
97+
License
98+
-------
99+
This algorithm is released under the GNU GPL license.
100+
101+
.. |PyPI Version| image:: https://img.shields.io/pypi/v/DFOLS.svg
102+
:target: https://pypi.python.org/pypi/DFOLS

dfols/__init__.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
"""
2+
DFO-LS
3+
====
4+
5+
Derivative-Free Optimization for Least-Squares (DFO-LS) is a
6+
nonlinear least-squares solver which only requires function values.
7+
8+
It solves the nonlinear least-squares problem:
9+
min_{x} f(x) = r1(x)**2 + ... + rm(x)**2,
10+
subject to the (optional) bounds
11+
lb <= x <= ub,
12+
where each function ri(x) is differentiable, possibly nonconvex.
13+
Since the derivatives of ri(x) are never required or approximated,
14+
the solver works when the evaluation of ri(x) is noisy.
15+
16+
----
17+
18+
This program is free software: you can redistribute it and/or modify
19+
it under the terms of the GNU General Public License as published by
20+
the Free Software Foundation, either version 3 of the License, or
21+
(at your option) any later version.
22+
23+
This program is distributed in the hope that it will be useful,
24+
but WITHOUT ANY WARRANTY; without even the implied warranty of
25+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+
GNU General Public License for more details.
27+
28+
You should have received a copy of the GNU General Public License
29+
along with this program. If not, see <http://www.gnu.org/licenses/>.
30+
31+
The development of this software was sponsored by NAG Ltd. (http://www.nag.co.uk)
32+
and the EPSRC Centre For Doctoral Training in Industrially Focused Mathematical
33+
Modelling (EP/L015803/1) at the University of Oxford. Please contact NAG for
34+
alternative licensing.
35+
36+
37+
"""
38+
39+
# Ensure compatibility with Python 2
40+
from __future__ import absolute_import, division, print_function, unicode_literals
41+
42+
from .version import __version__
43+
__all__ = ['__version__']
44+
45+
# Main solver & exit flags
46+
from .solver import *
47+
__all__ += ['solve']
48+

0 commit comments

Comments
 (0)