FunctionOptimization

scalation.optimization.quasi_newton.FunctionOptimization
See theFunctionOptimization companion object
case class FunctionOptimization(objFunction: FunctionV2S, gradFunction: FunctionV2V) extends OptimizationLogic

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(objFunction: FunctionV2S)

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

def this(benchmarkFunction: BenchmarkFunction)

Concrete methods

def evaluate(instance: Any, x: VectorD, n: Int, step: Double): LBFGSVarEvaluationResults

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

user data provided by each call of the lbfgsMain method. Can have Any type defined by the user as long as the same type is utilized in other instances that rely on this EvaluationLogic

n

the number of variables

step

current step chosen by the line search routine.

x

VectorD with the current values of the variables

Attributes

Returns

LBFGSVarEvaluationResults, results obtained from evaluating the variables

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def progress(instance: Any, x: VectorD, g: VectorD, fx: Double, xnorm: Double, gnorm: Double, step: Double, n: Int, k: Int, ls: Int): LBFGSReturnCode

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

VectorD with the current value of the gradient vector.

gnorm

Euclidean norm of the gradient vector.

instance

User data provided by each call of the lbfgsMain method of the LBFGS object. Can have Any type defined by the user as long as the same type is utilized in the evaluate method implementation for the class extending this trait and on the corresponding lbfgsMain calls from the LBFGS object that relies on this OptimizationLogic.

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

VectorD with 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