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
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)
def __init__(self, model, *args, **kwargs): self.model = model self.parameterisation = kwargs["prediction_parameterisation"] SimpleLBFGS.__init__(self, *args, **kwargs)