Module Lbfgs_s.Make
Parameters
Signature
type stop
= float -> state -> bool
stopping criterion function type
val iter : state -> int
iter s
returns the number of iterations for optimisation states
val prev_fv : state -> float
prev_fv s
returns the last objective function value of states
val fv_hist : state -> float list
fv_hist s
returns the history of the objective function values of states
up to the last objective function value (i.e.,prev_f s
is the same asList.hd (fv_hist s)
)
val init : ?corrections:int -> prms0:prms -> unit -> state
init ?corrections ~prms0 ()
returns an initialises optimisation state for initial parmatersprms0
val min : ?pgtol:float -> ?factr:float -> ?stop:stop -> f:f -> state -> float
min ~f state
minimisesf
with respect to the states
- parameter factr
tolerance in the termination test for the algorithm. The iteration will stop when
(f^k - f^{k+1})/max{ |f^k|, |f^{k+1}|, 1} <= factr*epsilon_float
. Set e.g.factr
to1e12
for low accuracy,1e7
for moderate accuracy and1e1
for extremely high accuracy. Settingfactr
to0.
suppresses this termination test. Default:1e7
.
- parameter pgtol
The iteration will stop when
max{ |proj g_i| : i = 0,..., n-1} <= pgtol
whereproj g_i
is the ith component of the projected gradient. Settingpgtol
to0.
suppresses this termination test. Default:1e-5
.
- parameter stop
An user-provided stopping criterion that terminates the optimization where
stop fv s
istrue
.