The FunctionOptimization case class to store the definition of a function optimization in a format that adheres to the optimization logic format used by the implementation of the Limited memory Broyden–Fletcher–Goldfarb–Shanno (BFGS) for unconstrained optimization (L-BFGS) algorithm.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait OptimizationLogictrait EvaluationLogicclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Constructors
This constructor uses numerical approximation for the gradient which is less accurate than hard-coded definition of gradient function.
This constructor uses numerical approximation for the gradient which is less accurate than hard-coded definition of gradient function.
Value parameters
- objFunction
-
the object finction to be optimized
Attributes
Concrete methods
Evaluates the gradients and objective function according to the state of the variables during the minimization process.
Evaluates the gradients and objective function according to the state of the variables during the minimization process.
Value parameters
- instance
-
an optional user data segment that may be provided when calling the
LBFGS.lbfgsMainmethod (@seeOptimizationLogic) - n
-
the number of variables
- step
-
current step chosen by the line search routine.
- x
-
VectorDwith the current values of the variables
Attributes
- Returns
-
LBFGSVarEvaluationResults, results obtained from evaluating the variables
Inherited methods
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
Receives the progress of each iteration of the optimization process. Can be used to display or record said progress and to determine if the optimization should continue or be cancelled. A default implementation is provided to just print the contents of the current iteration of the optimization.
Receives the progress of each iteration of the optimization process. Can be used to display or record said progress and to determine if the optimization should continue or be cancelled. A default implementation is provided to just print the contents of the current iteration of the optimization.
Value parameters
- fx
-
Current value of the objective function.
- g
-
VectorDwith the current value of the gradient vector. - gnorm
-
Euclidean norm of the gradient vector.
- instance
-
an optional user data segment that may be provided when calling the
LBFGS.lbfgsMainmethod and may haveAnytype, but must be the same type used by theevaluatemethod of classes extending this trait. Note, has typeMemorySegmentinOptimizationLogicC. - k
-
Iteration count.
- ls
-
The number of evaluations called for this iteration.
- n
-
The number of variables.
- step
-
Step used by the line search routine in this iteration.
- x
-
VectorDwith the current values of the variables. - xnorm
-
Euclidean norm of the variables.
Attributes
- Returns
-
int Determines if optimization should continue. Zero continues optimization. Non-zero values cancel the optimization.
- Inherited from:
- OptimizationLogic