optimize(algorithm=’l-bfgs-b’)#
- Model.optimize(mapping='distributed', algorithm=None, control_vector=None, bounds=None, jobs_fun='nse', wjobs_fun=None, event_seg=None, gauge='downstream', wgauge='mean', ost=None, options=None, verbose=True, inplace=False)
Optimize the Model using the Limited-memory Broyden-Fletcher-Goldfarb-Shanno Bounded (L-BFGS-B) algorithm.
See also
For documentation for the rest of the parameters, see
Model.optimize- Options:
- maxiterint, default 100
Maximum allowed number of iterations.
- jreg_funstr, sequence or None, default None
Type(s) of regularization function(s) to be minimized when using distributed mapping. Should be one or a sequence of any of
‘prior’
‘smoothing’
Note
If not given, the Model will be optimized without any regularization terms.
Hint
See a detailed explanation on the regularization function in Math / Num Documentation section.
- wjreg: float, default 0.01
Global regularization weight. Only used if jreg_fun is set.
- wjreg_funsequence or None, default None
Regularization function(s) weights in case of multi-regularization (i.e. a sequence of regularization functions to minimize). Only used if jreg_fun is set.
Note
If not given and jreg_fun is set with multi-regularization, the weights are set to 1.
- auto_wjregstr or None, default None
Type of method to automatically compute the regularization function weight(s) wjreg_fun. Only used if jreg_fun is set. Should be one of
‘fast’ (it consists of 2 optimization cycles)
‘lcurve’ (it consists of nb_wjreg_lcurve optimization cycles)
Note
If not given, the regularization weight(s) are computed using the values set in wjreg_fun.
- nb_wjreg_lcurveint, default 6
Number of optimization cycles during the process of automatically computing the regularization function weight(s) using the L-curve approach. Only used if jreg_fun is set and auto_wjreg = ‘lcurve’. The minimum value required is 6.
- return_lcurvebool, default False
If True, also return the L-curve results in the form of a dictionary. Only used if jreg_fun is set and auto_wjreg = ‘lcurve’.
- adjoint_testbool, default False
If True, perform an adjoint test (i.e. a scalar product test). Only used if mapping = ‘distributed’.