Skip to content

Commit cbdaa4d

Browse files
johannahaffnerJohanna Haffner
andauthored
Inline methods for updates to the Hessian and inverse Hessian approximations (#146)
* inline Hessian updates, remove separate update class. * add abstract versions of BFGS, DFP, LBFGS * temporarily remove from the documentation. --------- Co-authored-by: Johanna Haffner <[email protected]>
1 parent c487d56 commit cbdaa4d

File tree

9 files changed

+465
-442
lines changed

9 files changed

+465
-442
lines changed

docs/api/minimise.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,8 @@ In addition to the following, note that the [Optax](https://github.com/deepmind/
3737
::: optimistix.AbstractQuasiNewton
3838
options:
3939
members:
40-
false
41-
42-
[`optimistix.AbstractQuasiNewton`][] supports several update methods for the Hessian approximation. Optimistix currently provides two of these ([`optimistix.BFGSUpdate`][] and [`optimistix.DFPUpdate`][]), but you can also implement your own using the [`optimistix.AbstractQuasiNewtonUpdate`][] interface.
43-
44-
::: optimistix.AbstractQuasiNewtonUpdate
45-
options:
46-
members:
47-
- __call__
48-
49-
::: optimistix.BFGSUpdate
50-
options:
51-
members:
52-
- __init__
53-
54-
::: optimistix.DFPUpdate
55-
options:
56-
members:
57-
- __init__
40+
- init_hessian
41+
- update_hessian
5842

5943
::: optimistix.BFGS
6044
options:
@@ -66,6 +50,11 @@ In addition to the following, note that the [Optax](https://github.com/deepmind/
6650
members:
6751
- __init__
6852

53+
::: optimistix.LBFGS
54+
options:
55+
members:
56+
- __init__
57+
6958
---
7059

7160
::: optimistix.OptaxMinimiser

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ plugins:
7777
- hippogriffe:
7878
extra_public_objects:
7979
- jax.Array
80+
- jax.ShapeDtypeStruct
8081
- lineax.AutoLinearSolver
8182
- lineax.AbstractLinearSolver
8283
- lineax.AbstractLinearOperator

optimistix/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@
3737
)
3838
from ._solution import RESULTS as RESULTS, Solution as Solution
3939
from ._solver import (
40+
AbstractBFGS as AbstractBFGS,
41+
AbstractDFP as AbstractDFP,
4042
AbstractGaussNewton as AbstractGaussNewton,
4143
AbstractGradientDescent as AbstractGradientDescent,
44+
AbstractLBFGS as AbstractLBFGS,
4245
AbstractQuasiNewton as AbstractQuasiNewton,
43-
AbstractQuasiNewtonUpdate as AbstractQuasiNewtonUpdate,
4446
BacktrackingArmijo as BacktrackingArmijo,
4547
BestSoFarFixedPoint as BestSoFarFixedPoint,
4648
BestSoFarLeastSquares as BestSoFarLeastSquares,
4749
BestSoFarMinimiser as BestSoFarMinimiser,
4850
BestSoFarRootFinder as BestSoFarRootFinder,
4951
BFGS as BFGS,
50-
BFGSUpdate as BFGSUpdate,
5152
Bisection as Bisection,
5253
Chord as Chord,
5354
ClassicalTrustRegion as ClassicalTrustRegion,
5455
dai_yuan as dai_yuan,
5556
DampedNewtonDescent as DampedNewtonDescent,
5657
DFP as DFP,
57-
DFPUpdate as DFPUpdate,
5858
Dogleg as Dogleg,
5959
DoglegDescent as DoglegDescent,
6060
FixedPointIteration as FixedPointIteration,

optimistix/_solver/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
IndirectLevenbergMarquardt as IndirectLevenbergMarquardt,
2626
LevenbergMarquardt as LevenbergMarquardt,
2727
)
28-
from .limited_memory_bfgs import LBFGS as LBFGS
28+
from .limited_memory_bfgs import AbstractLBFGS as AbstractLBFGS, LBFGS as LBFGS
2929
from .nelder_mead import NelderMead as NelderMead
3030
from .newton_chord import Chord as Chord, Newton as Newton
3131
from .nonlinear_cg import (
@@ -38,12 +38,11 @@
3838
)
3939
from .optax import OptaxMinimiser as OptaxMinimiser
4040
from .quasi_newton import (
41+
AbstractBFGS as AbstractBFGS,
42+
AbstractDFP as AbstractDFP,
4143
AbstractQuasiNewton as AbstractQuasiNewton,
42-
AbstractQuasiNewtonUpdate as AbstractQuasiNewtonUpdate,
4344
BFGS as BFGS,
44-
BFGSUpdate as BFGSUpdate,
4545
DFP as DFP,
46-
DFPUpdate as DFPUpdate,
4746
)
4847
from .trust_region import (
4948
ClassicalTrustRegion as ClassicalTrustRegion,

0 commit comments

Comments
 (0)