Example #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
Example #2
0
 def __init__(
     self,
     scaler,
     target,
     prediction_parameterisation,
     constraints_manager=None,
     log=None,
     tracking=None,
     max_iterations=20,
 ):
     logger.info(
         "Performing a round of scaling with a Gauss-Newton minimizer.\n")
     ScalingLstbxBuildUpMixin.__init__(self, scaler, target,
                                       prediction_parameterisation)
     GaussNewtonIterations.__init__(
         self,
         target,
         prediction_parameterisation,
         constraints_manager,
         log=log,
         tracking=tracking,
         max_iterations=max_iterations,
     )