module Lbfgs: sig
.. end
The lbfgs library acts as a simple wrapper to the C
LBFGS library written by Naoaki Okazaki.
type
lbfgs_err =
| |
Success |
| |
Stop |
| |
AlreadyMinimized |
| |
UnknownError |
| |
LogicError |
| |
OutOfMemory |
| |
Canceled |
| |
InvalidN |
| |
InvalidNSSE |
| |
InvalidXSSE |
| |
InvalidEpsilon |
| |
InvalidTestPeriod |
| |
InvalidDelta |
| |
InvalidLinesearch |
| |
InvalidMinstep |
| |
InvalidMaxstep |
| |
InvalidFtol |
| |
InvalidWolfe |
| |
InvalidGtol |
| |
InvalidXtol |
| |
InvalidMaxLinesearch |
| |
InvalidOrthantwise |
| |
InvalidOrthantwiseStart |
| |
InvalidOrthantwiseEnd |
| |
OutOfInterval |
| |
IncorrectTminmax |
| |
RoundingError |
| |
MinimumStep |
| |
MaximumStep |
| |
MaximumLinesearch |
| |
MaximumIteration |
| |
WidthTooSmall |
| |
InvalidParameters |
| |
IncreaseGradient |
Type of error messages produced by LBFGS minimizer.
val errstring : lbfgs_err -> string
Convert an error type into a human-readable error string, mainly for
debugging purposes.
type
valgrad_func = float array -> float array -> float
Type of function callback used by the LBFGS minimizer. This
function must computing the value and gradient of a function at a
given point.
val minimize_l1 : float ->
valgrad_func -> float array -> float -> int -> lbfgs_err * float
minimize_l1 c f x decrease maxiter
finds the minimum of function f
with L1 penalty weight c
, starting its search at point x
.
Halts when the rate of decrease is less than decrease
or after
maxiter
iterations. Returns an error code and minimum function value.
x
is modified to contain the minimizing point.
val minimize_l1_simple : float -> valgrad_func -> float array -> lbfgs_err * float
minimize_l1_simple c f x
finds the minimum of function f
with L1 penalty weight c
, starting its search at point x
.
Uses default parameters for its convergence criteria.
Returns an error code and minimum function value.
x
is modified to contain the minimizing point.
val minimize : valgrad_func -> float array -> float -> int -> lbfgs_err * float
minimize f x decrease maxiter
finds the minimum of function f
,
starting its search at point x
. Halts when minimum rate of decrease
is less than decrease
or after maxiter
iterations. Returns an
error code and minimum function value. x
is modified to contain the
minimizing point.
val minimize_simple : valgrad_func -> float array -> lbfgs_err * float
minimize_simple f x
finds the minimum of function f
,
starting its search at point x
. Uses default parameters for
its convergence criteria. Returns an error code and minimum
function value. x
is modified to contain the minimizing point.