예제 #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")
     ScalingRefinery.__init__(self, scaler, *args, **kwargs)
     SimpleLBFGS.__init__(self, *args, **kwargs)
예제 #3
0
 def __init__(self, model, *args, **kwargs):
     self.model = model
     self.parameterisation = kwargs["prediction_parameterisation"]
     SimpleLBFGS.__init__(self, *args, **kwargs)