package lbfgs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module LbfgsSource

Binding to L-BFGS-B. These is a limited-memory quasi-Newton code for unconstrained and for bound-constrained optimization.

The authors of the original FORTRAN code expect that if you use their software in a publication, you quote one of these references:

  • R. H. Byrd, P. Lu and J. Nocedal. A Limited Memory Algorithm for Bound Constrained Optimization, (1995), SIAM Journal on Scientific and Statistical Computing , 16, 5, pp. 1190-1208.
  • C. Zhu, R. H. Byrd and J. Nocedal. L-BFGS-B: Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization (1997), ACM Transactions on Mathematical Software, Vol 23, Num. 4, pp. 550-560.
  • J.L. Morales and J. Nocedal. L-BFGS-B: Remark on Algorithm 778: L-BFGS-B, FORTRAN routines for large scale bound constrained optimization (2011), to appear in ACM Transactions on Mathematical Software.
  • version 0.9.3
Sourcetype work

Represent the memory space needed to solve a minimization problem. It is usually allocated automatically but it is possible to do it manually to, say, allocate it once only before a loop.

Sourceexception Abnormal of float * string

Abnormal(f, msg) is raised if the routine terminated abnormally without being able to satisfy the termination conditions. In such an event, the variable x (see F.min) will contain the current best approximation found and f is the value of the target function at x. msg is a message containing additional information (returned by the original FORTRAN code).

If the error message is not precise enough, it is recommended to turn printing on to understand what is the problem.

Sourcetype print =
  1. | No
    (*

    No output is generated.

    *)
  2. | Last
    (*

    Print one line at the last iteration.

    *)
  3. | Every of int
    (*

    Every k prints the value of the function and |proj gradient| every k iterations. Valid values are 0 <= k <= 98, otherwise the closer value in that interval is used.

    *)
  4. | Details
    (*

    Print details of every iteration (except vectors).

    *)
  5. | All
    (*

    Print details of every iteration (except vectors) including changes of active set and final x.

    *)
  6. | Full
    (*

    Print details of every iteration including x and g.

    *)

Control of the frequency at which information is outputted.

Sourcetype state

Holds informations on the current state of the computation that can help to decide whether to stop.

Sourcemodule F : sig ... end

Fortran Layout.

Sourcemodule C : sig ... end

C layout.

Sourceval work : ?corrections:int -> int -> work

work n allocate the work space for a problem of size at most n.

  • parameter corrections

    See F.min.

Accessing the state

Sourceval is_constrained : state -> bool

Tells whether the problem is constrained.

Sourceval nintervals : state -> int

The total number of intervals explored in the search of Cauchy points.

Sourceval nskipped_updates : state -> int

The total number of skipped BFGS updates before the current iteration.

Sourceval iter : state -> int

The number of current iteration.

Sourceval nupdates : state -> int

The total number of BFGS updates prior the current iteration.

Sourceval nintervals_current : state -> int

The number of intervals explored in the search of Cauchy point in the current iteration.

Sourceval neval : state -> int

The total number of function and gradient evaluations.

Sourceval neval_current : state -> int

The number of function value or gradient evaluations in the current iteration.

Sourceval previous_f : state -> float

Returns f(x) in the previous iteration.

Sourceval norm_dir : state -> float

2-norm of the line search direction vector.

Sourceval eps : state -> float

The machine precision epsmch generated by the code.

Sourceval time_cauchy : state -> float

The accumulated time spent on searching for Cauchy points.

Sourceval time_subspace_min : state -> float

The accumulated time spent on subspace minimization.

The accumulated time spent on line search.

Sourceval slope : state -> float

The slope of the line search function at the current point of line search.

Sourceval slope_init : state -> float

The slope of the line search function at the starting point of the line search.

Sourceval normi_grad : state -> float

The infinity norm of the projected gradient

OCaml

Innovation. Community. Security.