Skip to content

Commit

Permalink
Bug fix when shifting model base point, upgrade to v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lindonroberts committed Mar 5, 2019
1 parent 3bcdc47 commit 8a227d6
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 37 deletions.
5 changes: 3 additions & 2 deletions dfogn/dfogn.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,9 @@ def dfogn_main(objfun, x0, xl, xu, rhobeg, rhoend, maxfun):

# Severe cancellation is likely to occur if XOPT is too far from XBASE. [Fortran label 90]
if dsq <= rounding_error_const * sumsq(model.xopt()):
model.shift_base(model.xopt()) # includes a re-factorisation of the interpolation matrix
xnew = xnew - model.xopt()
base_shift = model.xopt()
xnew = xnew - base_shift # before xopt is updated
model.shift_base(base_shift) # includes a re-factorisation of the interpolation matrix

# Set KNEW to the index of the next interpolation point to be deleted to make room for a trust
# region step. Again RESCUE may be called if rounding errors have damaged
Expand Down
2 changes: 1 addition & 1 deletion dfogn/tests/test_dfogn.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def runTest(self):
soln = dfogn.solve(rosenbrock, x0)
self.assertTrue(array_compare(soln.x, np.array([1.0, 1.0]), thresh=1e-4), "Wrong xmin")
self.assertTrue(array_compare(soln.resid, rosenbrock(soln.x), thresh=1e-10), "Wrong resid")
self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=1e-2), "Wrong Jacobian")
self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=2e-2), "Wrong Jacobian")
self.assertTrue(abs(soln.f) < 1e-10, "Wrong fmin")


Expand Down
2 changes: 1 addition & 1 deletion dfogn/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"""

__version__ = '1.0'
__version__ = '1.0.1'
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 323aea43a5449895fd1471c6a55fc908
config: d2939da9da2b6169649cc2ef47c7f549
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 4 additions & 0 deletions docs/build/html/_sources/history.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ Version 1.0 (17 Jul 2018)
-------------------------
* Bug fix for installation when dependencies not installed, added requirements.txt - no changes to the DFO-GN algorithm.

Version 1.0.1 (5 Mar 2019)
--------------------------
* Bug fix when changing base point in model.

8 changes: 4 additions & 4 deletions docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Index &mdash; DFO-GN v1.0 documentation</title>
<title>Index &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -36,7 +36,7 @@
<link rel="index" title="Index"
href="#"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -198,7 +198,7 @@ <h1 id="index">Index</h1>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
15 changes: 11 additions & 4 deletions docs/build/html/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Version History &mdash; DFO-GN v1.0 documentation</title>
<title>Version History &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>
<link rel="prev" title="Using DFO-GN" href="userguide.html"/>


Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -98,6 +98,7 @@
<li class="toctree-l2"><a class="reference internal" href="#version-0-1-13-sep-2017">Version 0.1 (13 Sep 2017)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#version-0-2-20-feb-2018">Version 0.2 (20 Feb 2018)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#version-1-0-17-jul-2018">Version 1.0 (17 Jul 2018)</a></li>
<li class="toctree-l2"><a class="reference internal" href="#version-1-0-1-5-mar-2019">Version 1.0.1 (5 Mar 2019)</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -184,6 +185,12 @@ <h2>Version 1.0 (17 Jul 2018)<a class="headerlink" href="#version-1-0-17-jul-201
<li>Bug fix for installation when dependencies not installed, added requirements.txt - no changes to the DFO-GN algorithm.</li>
</ul>
</div>
<div class="section" id="version-1-0-1-5-mar-2019">
<h2>Version 1.0.1 (5 Mar 2019)<a class="headerlink" href="#version-1-0-1-5-mar-2019" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Bug fix when changing base point in model.</li>
</ul>
</div>
</div>


Expand Down Expand Up @@ -228,7 +235,7 @@ <h2>Version 1.0 (17 Jul 2018)<a class="headerlink" href="#version-1-0-17-jul-201
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
13 changes: 7 additions & 6 deletions docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>DFO-GN: A Derivative-Free Gauss-Newton Solver &mdash; DFO-GN v1.0 documentation</title>
<title>DFO-GN: A Derivative-Free Gauss-Newton Solver &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="#"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="#"/>
<link rel="next" title="Overview" href="info.html"/>


Expand Down Expand Up @@ -65,7 +65,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -160,8 +160,8 @@

<div class="section" id="dfo-gn-a-derivative-free-gauss-newton-solver">
<h1>DFO-GN: A Derivative-Free Gauss-Newton Solver<a class="headerlink" href="#dfo-gn-a-derivative-free-gauss-newton-solver" title="Permalink to this headline"></a></h1>
<p><strong>Release:</strong> 1.0</p>
<p><strong>Date:</strong> 10 August 2018</p>
<p><strong>Release:</strong> 1.0.1</p>
<p><strong>Date:</strong> 05 March 2019</p>
<p><strong>Author:</strong> <a class="reference external" href="mailto:lindon&#46;roberts&#37;&#52;&#48;maths&#46;ox&#46;ac&#46;uk">Lindon Roberts</a> (Mathematical Institute, University of Oxford)</p>
<p>DFO-GN is a Python package for finding local solutions to <strong>nonlinear least-squares minimization problems (with optional bound constraints)</strong>, without requiring any derivatives of the objective. DFO-GN stands for Derivative-Free Optimization using Gauss-Newton, and is applicable to problems such as</p>
<ul class="simple">
Expand Down Expand Up @@ -212,6 +212,7 @@ <h1>DFO-GN: A Derivative-Free Gauss-Newton Solver<a class="headerlink" href="#df
<li class="toctree-l2"><a class="reference internal" href="history.html#version-0-1-13-sep-2017">Version 0.1 (13 Sep 2017)</a></li>
<li class="toctree-l2"><a class="reference internal" href="history.html#version-0-2-20-feb-2018">Version 0.2 (20 Feb 2018)</a></li>
<li class="toctree-l2"><a class="reference internal" href="history.html#version-1-0-17-jul-2018">Version 1.0 (17 Jul 2018)</a></li>
<li class="toctree-l2"><a class="reference internal" href="history.html#version-1-0-1-5-mar-2019">Version 1.0.1 (5 Mar 2019)</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -266,7 +267,7 @@ <h2>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permal
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
8 changes: 4 additions & 4 deletions docs/build/html/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Overview &mdash; DFO-GN v1.0 documentation</title>
<title>Overview &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>
<link rel="next" title="Installing DFO-GN" href="install.html"/>
<link rel="prev" title="DFO-GN: A Derivative-Free Gauss-Newton Solver" href="index.html"/>

Expand Down Expand Up @@ -66,7 +66,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -276,7 +276,7 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
8 changes: 4 additions & 4 deletions docs/build/html/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Installing DFO-GN &mdash; DFO-GN v1.0 documentation</title>
<title>Installing DFO-GN &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>
<link rel="next" title="Using DFO-GN" href="userguide.html"/>
<link rel="prev" title="Overview" href="info.html"/>

Expand Down Expand Up @@ -66,7 +66,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -299,7 +299,7 @@ <h2>Uninstallation<a class="headerlink" href="#uninstallation" title="Permalink
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
Binary file modified docs/build/html/objects.inv
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Search &mdash; DFO-GN v1.0 documentation</title>
<title>Search &mdash; DFO-GN v1.0.1 documentation</title>



Expand All @@ -35,7 +35,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="#"/>
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -64,7 +64,7 @@


<div class="version">
1.0
1.0.1
</div>


Expand Down Expand Up @@ -201,7 +201,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'1.0',
VERSION:'1.0.1',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
Loading

0 comments on commit 8a227d6

Please sign in to comment.