Stability | experimental |
---|---|
Maintainer | Danil de Kok <me@danieldk.eu> |
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:
- data LineSearchAlgorithm
- type EvaluateFun a = a -> StorableArray Int CDouble -> StorableArray Int CDouble -> CInt -> CDouble -> IO CDouble
- type ProgressFun a = a -> StorableArray Int CDouble -> StorableArray Int CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> CInt -> CInt -> CInt -> IO CInt
- data LBFGSResult
- lbfgs :: LineSearchAlgorithm -> EvaluateFun a -> ProgressFun a -> a -> [Double] -> IO (LBFGSResult, [Double])
Documentation
data LineSearchAlgorithm Source
Various line search algorithms. Wolfe backtracking algorithms require a coefficient.
type EvaluateFun aSource
= 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
= 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.
:: 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.