minimize#
- class cuqi.solver.minimize(func, x0, gradfunc=None, method=None, **kwargs)#
Wrapper for
scipy.optimize.minimize()
.Minimize a function func using scipy’s optimize.minimize module.
- Parameters:
func (callable f(x,*args)) – Function to minimize.
x0 (ndarray) – Initial guess.
gradfunc (callable f(x,*args), optional) – The gradient of func. If None, then the solver approximates the gradient.
method (str or callable, optional) – Type of solver. Should be one of ‘Nelder-Mead’ ‘Powell’ ‘CG’ ‘BFGS’ ‘Newton-CG’ ‘L-BFGS-B’ ‘TNC’ ‘COBYLA’ ‘SLSQP’ ‘trust-constr’ ‘dogleg’ ‘trust-ncg’ ‘trust-exact’ ‘trust-krylov’ If not given, chosen to be one of BFGS, L-BFGS-B, SLSQP, depending if the problem has constraints or bounds.
kwargs (keyword arguments passed to scipy's minimizer. See documentation for scipy.optimize.minimize)
- :meth:`solve`: Runs the solver and returns the solution and info about the optimization.
- __init__(func, x0, gradfunc=None, method=None, **kwargs)#
Methods