Skip to content

Commit 8a227d6

Browse files
committed
Bug fix when shifting model base point, upgrade to v1.0.1
1 parent 3bcdc47 commit 8a227d6

17 files changed

+54
-37
lines changed

dfogn/dfogn.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,9 @@ def dfogn_main(objfun, x0, xl, xu, rhobeg, rhoend, maxfun):
723723

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

729730
# Set KNEW to the index of the next interpolation point to be deleted to make room for a trust
730731
# region step. Again RESCUE may be called if rounding errors have damaged

dfogn/tests/test_dfogn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def runTest(self):
4949
soln = dfogn.solve(rosenbrock, x0)
5050
self.assertTrue(array_compare(soln.x, np.array([1.0, 1.0]), thresh=1e-4), "Wrong xmin")
5151
self.assertTrue(array_compare(soln.resid, rosenbrock(soln.x), thresh=1e-10), "Wrong resid")
52-
self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=1e-2), "Wrong Jacobian")
52+
self.assertTrue(array_compare(soln.jacobian, rosenbrock_jacobian(soln.x), thresh=2e-2), "Wrong Jacobian")
5353
self.assertTrue(abs(soln.f) < 1e-10, "Wrong fmin")
5454

5555

dfogn/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424
2525
"""
2626

27-
__version__ = '1.0'
27+
__version__ = '1.0.1'

docs/build/html/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 323aea43a5449895fd1471c6a55fc908
3+
config: d2939da9da2b6169649cc2ef47c7f549
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/build/html/_sources/history.rst.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ Version 1.0 (17 Jul 2018)
1414
-------------------------
1515
* Bug fix for installation when dependencies not installed, added requirements.txt - no changes to the DFO-GN algorithm.
1616

17+
Version 1.0.1 (5 Mar 2019)
18+
--------------------------
19+
* Bug fix when changing base point in model.
20+

docs/build/html/genindex.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

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

1414

1515

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

4141

4242
<script src="_static/js/modernizr.min.js"></script>
@@ -65,7 +65,7 @@
6565

6666

6767
<div class="version">
68-
1.0
68+
1.0.1
6969
</div>
7070

7171

@@ -198,7 +198,7 @@ <h1 id="index">Index</h1>
198198
<script type="text/javascript">
199199
var DOCUMENTATION_OPTIONS = {
200200
URL_ROOT:'./',
201-
VERSION:'1.0',
201+
VERSION:'1.0.1',
202202
COLLAPSE_INDEX:false,
203203
FILE_SUFFIX:'.html',
204204
HAS_SOURCE: true,

docs/build/html/history.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

1313

1414

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

4141

@@ -65,7 +65,7 @@
6565

6666

6767
<div class="version">
68-
1.0
68+
1.0.1
6969
</div>
7070

7171

@@ -98,6 +98,7 @@
9898
<li class="toctree-l2"><a class="reference internal" href="#version-0-1-13-sep-2017">Version 0.1 (13 Sep 2017)</a></li>
9999
<li class="toctree-l2"><a class="reference internal" href="#version-0-2-20-feb-2018">Version 0.2 (20 Feb 2018)</a></li>
100100
<li class="toctree-l2"><a class="reference internal" href="#version-1-0-17-jul-2018">Version 1.0 (17 Jul 2018)</a></li>
101+
<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>
101102
</ul>
102103
</li>
103104
</ul>
@@ -184,6 +185,12 @@ <h2>Version 1.0 (17 Jul 2018)<a class="headerlink" href="#version-1-0-17-jul-201
184185
<li>Bug fix for installation when dependencies not installed, added requirements.txt - no changes to the DFO-GN algorithm.</li>
185186
</ul>
186187
</div>
188+
<div class="section" id="version-1-0-1-5-mar-2019">
189+
<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>
190+
<ul class="simple">
191+
<li>Bug fix when changing base point in model.</li>
192+
</ul>
193+
</div>
187194
</div>
188195

189196

@@ -228,7 +235,7 @@ <h2>Version 1.0 (17 Jul 2018)<a class="headerlink" href="#version-1-0-17-jul-201
228235
<script type="text/javascript">
229236
var DOCUMENTATION_OPTIONS = {
230237
URL_ROOT:'./',
231-
VERSION:'1.0',
238+
VERSION:'1.0.1',
232239
COLLAPSE_INDEX:false,
233240
FILE_SUFFIX:'.html',
234241
HAS_SOURCE: true,

docs/build/html/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

1313

1414

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

4141

@@ -65,7 +65,7 @@
6565

6666

6767
<div class="version">
68-
1.0
68+
1.0.1
6969
</div>
7070

7171

@@ -160,8 +160,8 @@
160160

161161
<div class="section" id="dfo-gn-a-derivative-free-gauss-newton-solver">
162162
<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>
163-
<p><strong>Release:</strong> 1.0</p>
164-
<p><strong>Date:</strong> 10 August 2018</p>
163+
<p><strong>Release:</strong> 1.0.1</p>
164+
<p><strong>Date:</strong> 05 March 2019</p>
165165
<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>
166166
<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>
167167
<ul class="simple">
@@ -212,6 +212,7 @@ <h1>DFO-GN: A Derivative-Free Gauss-Newton Solver<a class="headerlink" href="#df
212212
<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>
213213
<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>
214214
<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>
215+
<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>
215216
</ul>
216217
</li>
217218
</ul>
@@ -266,7 +267,7 @@ <h2>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permal
266267
<script type="text/javascript">
267268
var DOCUMENTATION_OPTIONS = {
268269
URL_ROOT:'./',
269-
VERSION:'1.0',
270+
VERSION:'1.0.1',
270271
COLLAPSE_INDEX:false,
271272
FILE_SUFFIX:'.html',
272273
HAS_SOURCE: true,

docs/build/html/info.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

1313

1414

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

@@ -66,7 +66,7 @@
6666

6767

6868
<div class="version">
69-
1.0
69+
1.0.1
7070
</div>
7171

7272

@@ -276,7 +276,7 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
276276
<script type="text/javascript">
277277
var DOCUMENTATION_OPTIONS = {
278278
URL_ROOT:'./',
279-
VERSION:'1.0',
279+
VERSION:'1.0.1',
280280
COLLAPSE_INDEX:false,
281281
FILE_SUFFIX:'.html',
282282
HAS_SOURCE: true,

docs/build/html/install.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

1313

1414

@@ -35,7 +35,7 @@
3535
<link rel="index" title="Index"
3636
href="genindex.html"/>
3737
<link rel="search" title="Search" href="search.html"/>
38-
<link rel="top" title="DFO-GN v1.0 documentation" href="index.html"/>
38+
<link rel="top" title="DFO-GN v1.0.1 documentation" href="index.html"/>
3939
<link rel="next" title="Using DFO-GN" href="userguide.html"/>
4040
<link rel="prev" title="Overview" href="info.html"/>
4141

@@ -66,7 +66,7 @@
6666

6767

6868
<div class="version">
69-
1.0
69+
1.0.1
7070
</div>
7171

7272

@@ -299,7 +299,7 @@ <h2>Uninstallation<a class="headerlink" href="#uninstallation" title="Permalink
299299
<script type="text/javascript">
300300
var DOCUMENTATION_OPTIONS = {
301301
URL_ROOT:'./',
302-
VERSION:'1.0',
302+
VERSION:'1.0.1',
303303
COLLAPSE_INDEX:false,
304304
FILE_SUFFIX:'.html',
305305
HAS_SOURCE: true,

docs/build/html/objects.inv

2 Bytes
Binary file not shown.

docs/build/html/search.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

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

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

1313

1414

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

4040

4141
<script src="_static/js/modernizr.min.js"></script>
@@ -64,7 +64,7 @@
6464

6565

6666
<div class="version">
67-
1.0
67+
1.0.1
6868
</div>
6969

7070

@@ -201,7 +201,7 @@
201201
<script type="text/javascript">
202202
var DOCUMENTATION_OPTIONS = {
203203
URL_ROOT:'./',
204-
VERSION:'1.0',
204+
VERSION:'1.0.1',
205205
COLLAPSE_INDEX:false,
206206
FILE_SUFFIX:'.html',
207207
HAS_SOURCE: true,

0 commit comments

Comments
 (0)