pycif.plugins.minimizers.scipy — API reference

Contents

pycif.plugins.minimizers.scipy — API reference#

Configuration reference: scipy plugin

pycif.plugins.minimizers.scipy.minimize.minimize(self, finit, gradinit, chi0, **kwargs)[source]#

Run scipy.optimize.minimize() and return the optimal iterate.

Wraps the simulator into a (f, g) callable compatible with scipy’s jac=True interface and hooks a gradient-norm callback for the epsg convergence criterion.

Parameters:
  • self (Plugin) – scipy minimizer plugin instance.

  • finit (float) – initial cost function value (unused; kept for interface consistency with other minimizers).

  • gradinit (np.ndarray) – initial gradient, shape (n,).

  • chi0 (np.ndarray) – initial iterate, shape (n,).

  • **kwargs – forwarded to the simulator.

Returns:

optimal iterate \(\chi_\mathrm{opt}\), shape (n,).

Return type:

np.ndarray