Commit bfdb0c7f authored by Martin Reinecke's avatar Martin Reinecke


parent 95837aad
......@@ -64,7 +64,7 @@ from .minimization.nonlinear_cg import NonlinearCG
from .minimization.descent_minimizers import (
DescentMinimizer, SteepestDescent, VL_BFGS, L_BFGS, RelaxedNewton,
from .minimization.scipy_minimizer import (ScipyMinimizer, L_BFGS_B, ScipyCG)
from .minimization.scipy_minimizer import L_BFGS_B
from import Energy
from .minimization.quadratic_energy import QuadraticEnergy
from .minimization.energy_adapter import EnergyAdapter
......@@ -73,7 +73,7 @@ from .minimization.kl_energy import KL_Energy
from .sugar import *
from .plot import Plot
from .library.smooth_linear_amplitude import (SLAmplitude, CepstrumOperator)
from .library.smooth_linear_amplitude import SLAmplitude, CepstrumOperator
from .library.inverse_gamma_operator import InverseGammaOperator
from .library.los_response import LOSResponse
from .library.dynamic_operator import (dynamic_operator,
......@@ -93,7 +93,7 @@ class _MinHelper(object):
return _toArray_rw(res)
class ScipyMinimizer(Minimizer):
class _ScipyMinimizer(Minimizer):
"""Scipy-based minimizer
......@@ -136,19 +136,19 @@ class ScipyMinimizer(Minimizer):
def L_BFGS_B(ftol, gtol, maxiter, maxcor=10, disp=False, bounds=None):
"""Returns a ScipyMinimizer object carrying out the L-BFGS-B algorithm.
"""Returns a _ScipyMinimizer object carrying out the L-BFGS-B algorithm.
See Also
options = {"ftol": ftol, "gtol": gtol, "maxiter": maxiter,
"maxcor": maxcor, "disp": disp}
return ScipyMinimizer("L-BFGS-B", options, False, bounds)
return _ScipyMinimizer("L-BFGS-B", options, False, bounds)
class ScipyCG(Minimizer):
"""Returns a ScipyMinimizer object carrying out the conjugate gradient
class _ScipyCG(Minimizer):
"""Returns a _ScipyMinimizer object carrying out the conjugate gradient
algorithm as implemented by SciPy.
This class is only intended for double-checking NIFTy's own conjugate
......@@ -41,7 +41,8 @@ minimizers = [
newton_minimizers = ['ift.RelaxedNewton(IC)']
quadratic_only_minimizers = [
'ift.ConjugateGradient(IC)', 'ift.ScipyCG(tol=1e-5, maxiter=300)'
'ift.minimization.scipy_minimizer._ScipyCG(tol=1e-5, maxiter=300)'
slow_minimizers = ['ift.SteepestDescent(IC)']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment