lbfgs-0.0.3: L-BFGS optimization

Stabilityexperimental
MaintainerDanil de Kok <me@danieldk.eu>

Numeric.LBFGS

Description

Binding for the liblbfgs library, much implements the Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method for solving unconstrained minimization problems. The original C library is available from:

http://www.chokkan.org/software/liblbfgs/

Synopsis

Documentation

data LineSearchAlgorithm Source

Various line search algorithms. Wolfe backtracking algorithms require a coefficient.

type EvaluateFun aSource

Arguments

 = a

Instance data

-> StorableArray Int CDouble

Current variables (should not be modified by the function)

-> StorableArray Int CDouble

Gradients

-> CInt

Number of variables

-> CDouble

Step of the line search algorithm

-> IO CDouble

Value of the objective function

Type signature for the objective function and gradient evaluations.

type ProgressFun aSource

Arguments

 = a

Instance data

-> StorableArray Int CDouble

Variables (should not be modified by the function)

-> StorableArray Int CDouble

Gradients (should not be modified by the function)

-> CDouble

Value of the objective function

-> CDouble

Euclidean norm of the variables

-> CDouble

Eucledian norm of the gradients

-> CDouble

Step of the line search algorithm

-> CInt

Number of variables

-> CInt

Iteration count

-> CInt

Number of evaluations for this iteration

-> IO CInt

Return zero to continue the evaluation, non-zero otherwise

Type signature for a function reporting on the progress of the optimization.

lbfgsSource

Arguments

:: LineSearchAlgorithm

The line search algorithm

-> EvaluateFun a

Objective function

-> ProgressFun a

Progress report function

-> a

Instance data

-> [Double]

Initial variable values

-> IO (LBFGSResult, [Double])

Result and variable values

Start a L-BFGS optimization. The initial variables should be provided as a list of doubles.