scipy/std scipy/std#

Description#

scipy minimizer: wrapper around scipy.optimize.minimize().

This plugin delegates minimisation to scipy.optimize.minimize, giving access to a broad collection of gradient-based and gradient-free algorithms (L-BFGS-B, BFGS, CG, SLSQP, …).

Control variable bounds (L-BFGS-B): box constraints can be passed to supported methods by setting use_boundaries: True in the control vector YAML block and defining lower_bound / upper_bound for each tracer in the datavect.

YAML arguments#

The following arguments are used to configure the plugin. pyCIF will return an exception at the initialization if mandatory arguments are not specified, or if any argument does not fit accepted values or type:

Mandatory arguments#

method : str, mandatory

Type of solver.

Optional arguments#

maxiter : int, optional

Maximum number of iterations

maxfun : int, optional

Maximum number of function evaluation

epsg : float, optional

Condition on the norm of the gradient. Converges if ||g||_k < epsg . ||g||_0

Requirements#

The current plugin requires the present plugins to run properly:

Requirement name

Requirement type

Explicit definition

Any valid

Default name

Default version

simulator

Simulator

False

True

gausscost

std

YAML template#

Please find below a template for a YAML configuration:

 1minimizer:
 2  plugin:
 3    name: scipy
 4    version: std
 5    type: minimizer
 6
 7  # Mandatory arguments
 8  method: XXXXX  # str
 9
10  # Optional arguments
11  maxiter: XXXXX  # int
12  maxfun: XXXXX  # int
13  epsg: XXXXX  # float