Commit 83dd4138 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'privatization' into 'NIFTy_5'

Privatization

See merge request ift/nifty-dev!201
parents e1e58be3 08279a38
......@@ -64,7 +64,7 @@ from .minimization.nonlinear_cg import NonlinearCG
from .minimization.descent_minimizers import (
DescentMinimizer, SteepestDescent, VL_BFGS, L_BFGS, RelaxedNewton,
NewtonCG)
from .minimization.scipy_minimizer import (ScipyMinimizer, L_BFGS_B, ScipyCG)
from .minimization.scipy_minimizer import L_BFGS_B
from .minimization.energy import Energy
from .minimization.quadratic_energy import QuadraticEnergy
from .minimization.energy_adapter import EnergyAdapter
......@@ -73,7 +73,7 @@ from .minimization.metric_gaussian_kl import MetricGaussianKL
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
Parameters
......@@ -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
--------
ScipyMinimizer
_ScipyMinimizer
"""
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.ConjugateGradient(IC)',
'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