def optimize(self, optimizer=None, start=None, messages=False, max_iters=1000, ipython_notebook=True, clear_after_finish=False, **kwargs):
        self.inference_method.on_optimization_start()
        try:
            super(GP, self).optimize(optimizer, start, messages, max_iters, ipython_notebook, clear_after_finish, **kwargs)
        except KeyboardInterrupt:
            print("KeyboardInterrupt caught, calling on_optimization_end() to round things up")
            self.inference_method.on_optimization_end()
            raise
Optimize the model using self.log_likelihood and self.log_likelihood_gradient, as well as self.priors.
dataset/ETHPy150Open SheffieldML/GPy/GPy/core/gp.py/GP.optimize