Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
c3627c40
Commit
c3627c40
authored
Feb 19, 2018
by
Martin Reinecke
Browse files
more docs
parent
cc7f44e4
Pipeline
#25134
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docs/source/code.rst
View file @
c3627c40
...
...
@@ -288,6 +288,11 @@ Of these algorithms, only :class:`RelaxedNewton` requires the energy object to
provide a :attr:`~Energy.curvature` property, the others only need energy
values and gradients.
The flexibility of NIFTy's design allows using externally provided
minimizers. With only small effort, adapters for two SciPy minimizers were
written; they are available under the names :class:`NewtonCG` and
:class:`L_BFGS_B`.
Application to operator inversion
---------------------------------
...
...
@@ -302,5 +307,5 @@ A classical example is the information propagator
which must be applied when calculating a Wiener filter. Only its inverse
application is straightforward; to use it in forward direction, we make use
of NIFTy's :class:`InversionEnabler` class, which internally performs a
minimization of a :class:`QuadraticEnergy` by means of
a
minimization of a :class:`QuadraticEnergy` by means of
the
:class:`ConjugateGradient` algorithm.
nifty4/minimization/__init__.py
View file @
c3627c40
...
...
@@ -9,7 +9,7 @@ from .descent_minimizer import DescentMinimizer
from
.steepest_descent
import
SteepestDescent
from
.vl_bfgs
import
VL_BFGS
from
.relaxed_newton
import
RelaxedNewton
from
.scipy_minimizer
import
NewtonCG
,
L_BFGS_B
from
.scipy_minimizer
import
ScipyMinimizer
,
NewtonCG
,
L_BFGS_B
from
.energy
import
Energy
from
.quadratic_energy
import
QuadraticEnergy
from
.line_energy
import
LineEnergy
...
...
@@ -17,5 +17,5 @@ from .line_energy import LineEnergy
__all__
=
[
"LineSearch"
,
"LineSearchStrongWolfe"
,
"IterationController"
,
"GradientNormController"
,
"Minimizer"
,
"ConjugateGradient"
,
"NonlinearCG"
,
"DescentMinimizer"
,
"SteepestDescent"
,
"VL_BFGS"
,
"RelaxedNewton"
,
"
NewtonCG
"
,
"L_BFGS_B"
,
"Energy"
,
"QuadraticEnergy"
,
"LineEnergy"
]
"SteepestDescent"
,
"VL_BFGS"
,
"RelaxedNewton"
,
"
ScipyMinimizer
"
,
"NewtonCG"
,
"L_BFGS_B"
,
"Energy"
,
"QuadraticEnergy"
,
"LineEnergy"
]
nifty4/minimization/scipy_minimizer.py
View file @
c3627c40
...
...
@@ -104,11 +104,23 @@ class ScipyMinimizer(Minimizer):
def
NewtonCG
(
controller
):
"""Returns a ScipyMinimizer object carrying out the Newton-CG algorithm.
See Also
--------
ScipyMinimizer
"""
return
ScipyMinimizer
(
controller
,
"Newton-CG"
,
{
"xtol"
:
1e-20
,
"maxiter"
:
None
},
True
)
def
L_BFGS_B
(
controller
,
maxcor
=
10
):
"""Returns a ScipyMinimizer object carrying out the L-BFGS-B algorithm.
See Also
--------
ScipyMinimizer
"""
return
ScipyMinimizer
(
controller
,
"L-BFGS-B"
,
{
"ftol"
:
1e-20
,
"gtol"
:
1e-20
,
"maxcor"
:
maxcor
},
False
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment