예제 #1
0
    def build_minimiser(self):

        assert self._params.engine in [
            "SimpleLBFGS", "LBFGScurvs", "GaussNewton"
        ]

        if self._params.engine == "SimpleLBFGS":
            refiner = SimpleLBFGS(
                target=self._target,
                prediction_parameterisation=self._prediction_parameterisation,
                log=self._params.logfile,
            )
            return refiner

        if self._params.engine == "LBFGScurvs":
            refiner = LBFGScurvs(
                target=self._target,
                prediction_parameterisation=self._prediction_parameterisation,
                log=self._params.logfile,
            )
            return refiner

        if self._params.engine == "GaussNewton":

            refiner = GaussNewtonIterations(
                target=self._target,
                prediction_parameterisation=self._prediction_parameterisation,
                log=self._params.logfile,
            )
            return refiner
예제 #2
0
 def __init__(self, scaler, *args, **kwargs):
     logger.info("Performing a round of scaling with an LBFGS minimizer. \n")
     LBFGScurvs.__init__(self, *args, **kwargs)
     ScalingRefinery.__init__(self, scaler, *args, **kwargs)
     self._target.curvatures = True