| Copyright | (c) 2010 Daniël de Kok, 2016 Ian-Woo.Kim |
|---|---|
| License | Apache 2 |
| Maintainer | Daniël de Kok <me@danieldk.eu> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell98 |
Numeric.LBFGS.Vector
Description
- data LineSearchAlgorithm
- type EvaluateFun a = a -> IOVector CDouble -> IOVector CDouble -> CInt -> CDouble -> IO CDouble
- type ProgressFun a = a -> IOVector CDouble -> IOVector CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> CInt -> CInt -> CInt -> IO CInt
- data LBFGSParameters = LBFGSParameters {}
- data LBFGSResult
- = 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
- lbfgs :: LBFGSParameters -> 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 a Source #
Arguments
| = a | Instance data |
| -> IOVector CDouble | Current variables (should not be modified by the function) -- previously, StorableArray Int CDouble |
| -> IOVector CDouble | Gradients -- previously, StorableArray Int CDouble |
| -> 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 a Source #
Arguments
| = a | Instance data |
| -> IOVector CDouble | Variables (should not be modified by the function) -- previously, StorableArray Int CDouble |
| -> IOVector CDouble | Gradients (should not be modified by the function) -- previously, StorableArray Int CDouble |
| -> 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.
data LBFGSResult Source #
Constructors
Instances
Arguments
| :: LBFGSParameters | Parameters |
| -> 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.