squlearn.optimizers.LBFGSB

class squlearn.optimizers.LBFGSB(options: dict = None, callback=<function default_callback>)

Wrapper class for scipy’s L-BFGS-B implementation.

Parameters:

options (dict) – Options for the L-BFGS-B optimizer. The options are the same as for scipy.optimize.minimize()

minimize(fun: callable, x0: ndarray, grad: callable = None, bounds=None) OptimizerResult

Function to minimize a given function using the L-BFGS-B optimizer. Is wrapped from scipy.

Parameters:
  • fun (callable) – Function to minimize.

  • x0 (numpy.ndarray) – Initial guess.

  • grad (callable) – Gradient of the function to minimize.

  • bounds (sequence) – Bounds for the parameters.

Returns:

OptimizerResult format.

Return type:

Result of the optimization in class

set_callback(callback)

Set the callback function with additional iteration counter increasing.