The FunctionOptimizationFFM
case class ...
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait OptimizationLogicFFMclass Objecttrait Matchableclass AnyShow all
Members list
Value members
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
- g
-
Return location for the gradient vector that will be calculated with the current variables (this parameter is used to RETURN values, NOT to RECEIVE them). Empty
MemorySegment
with capacity forn
elements with theValueLayout
ofJAVA_DOUBLE
. - instance
-
User data provided by each call of the
lbfgsMain
method of theLBFGS_FFM
object. Can have anyMemoryLayout
defined by the user as long as the same layout is utilized in theprogress
method implementation for the class extending this trait and on the correspondinglbfgsMain
calls from theLBFGS_FFM
object that relies on thisOptimizationLogicWrapper
. - n
-
The number of variables. Also, the number of elements in the
MemorySegment
parametersx
andg
. - step
-
Current step used by the line search routine.
- x
-
Current values of the variables presented in a
MemorySegment
containingn
elements with theValueLayout
ofJAVA_DOUBLE
.
Attributes
- Returns
-
Double Value of the objective function computed with the given variables.
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- 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.
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.
The default implementation of this method always returns 0 and prints the iteration, function value, the value of each variable, the euclidean norms of the variables and the gradient vector and the step used in the line search in this iteration.
Value parameters
- fx
-
Current value of the objective function.
- g
-
Current value of the gradient vector presented in a
MemorySegment
containingn
elements with theValueLayout
ofJAVA_DOUBLE
. - gnorm
-
Euclidean norm of the gradient vector.
- instance
-
User data provided by each call of the
lbfgsMain
method of theLBFGS_FFM
object. Can have anyMemoryLayout
defined by the user as long as the same layout is utilized in theevaluate
method implementation for the class extending this trait and on the correspondinglbfgsMain
calls from theLBFGS_FFM
object that relies on thisOptimizationLogicWrapper
. - k
-
Iteration count.
- ls
-
The number of evaluations called for this iteration.
- n
-
The number of variables. Also, the number of elements in the
MemorySegment
parametersx
andg
. - step
-
Step used by the line search routine in this iteration.
- x
-
Current values of the variables presented in a
MemorySegment
containingn
elements with theValueLayout
ofJAVA_DOUBLE
. - 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:
- OptimizationLogicFFM