IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Performs minimization of multivariate functions by the LBFGS method. More...
Public Member Functions | |
MinimizerLbfgs (FunctionWithGradient function, double[] initialGuess, int maxIterations, double tolGrad, double tolValue, double tolParameters) | |
Constructs a new function mnimizer. More... | |
override void | InitializeIteration () |
Initializes the solution iteration. More... | |
override void | NextIteration () |
Optimization of quadratic functions. More... | |
override void | Minimize () |
Optimization of quadratic functions. More... | |
Protected Attributes | |
int | _maxIterationsLbfgs = DefaultMaxIterationsLbfgs |
lbfgs.lbfgsstate | LbfgsState |
LBFGS algorithm's state struct. More... | |
lbfgs.lbfgsreport | LbfgsReport |
LBFGS algorithm's results. More... | |
Protected Attributes inherited from NumLib.MinimizerBase | |
int | _outputLevel = DefaultOutputLevel |
int | _maxIterations = DefaultMaxIterations |
double | _toleranceFunctionValue = DefaultToleranceFunctionValue |
double | _toleranceParameterNorm = DefaultToleranceParameterNorm |
double | _toleranceGradientNorm = DefaultToleranceGradientNorm |
FunctionWithGradient | _function |
double[] | _initialGuess |
int | _numParameters |
double[] | _currentGuess |
double | _currentValue |
double[] | _currentGradient |
double[] | _solutionParameters |
double | _solutionValue |
double[] | _solutionGradient |
int | _iterationCount = 0 |
int | _evalutaionCount = 0 |
bool | _isConvergenceCriteriaMet = false |
Static Protected Attributes | |
static int | _defaultMaxIterationsLbfgs = 500 |
Static Protected Attributes inherited from NumLib.MinimizerBase | |
static int | _defaultOutputLevel = 0 |
static int | _defaultMaxiIterations = 1000 |
static double | _defaultToleranceFunctionValue = -1 |
static double | _defaultToleranceParemeterNorm = -1 |
static double | _defaultToleranceGradientNorm = 1.0e-6 |
Properties | |
static int | DefaultMaxIterationsLbfgs [get, set] |
Default value for the maximal number of iterations for the Lbfgs method. More... | |
override int | MaxIterations [get, set] |
Maximal number of iterations. More... | |
Properties inherited from NumLib.MinimizerBase | |
static int | DefaultOutputLevel [get, set] |
Default output level for nonlinear equation solvers. More... | |
static int | DefaultMaxIterations [get, set] |
Default value for the maximal number of iterations. More... | |
static double | DefaultToleranceFunctionValue [get, set] |
Default tolerance on the error of the value of the minimized function in solution. More... | |
static double | DefaultToleranceParameterNorm [get, set] |
Default tolerance on norm of the errors in parameters in the solution. More... | |
static double | DefaultToleranceGradientNorm [get, set] |
Default tolerance on norm of the function gradient in the solution. More... | |
virtual int | OutputLevel [get, set] |
Level of console output for nonlinear equation solvers. More... | |
virtual int | MaxIterations [get, set] |
Maximal number of iterations. More... | |
virtual double | ToleranceFunctionValue [get, set] |
Tolerance on absolute error of function value of the function in solution. More... | |
virtual double | ToleranceParameters [get, set] |
Tolerance on norm of error in parameters in solution. More... | |
virtual double | ToleranceFunctionGradient [get, set] |
Tolerance on absolute error of function value of the function in solution. More... | |
virtual FunctionWithGradient | Function [get, set] |
Function to be minimized. More... | |
virtual double[] | InitialGuess [get, set] |
Initial guess. More... | |
virtual int | NumParameters [get, protected set] |
Number of parameters. More... | |
virtual double[] | CurrentGuess [get, set] |
Current guess. More... | |
virtual double | CurrentValue [get, set] |
Current function value. More... | |
virtual double[] | CurrentGradient [get, set] |
Current function gradient. More... | |
virtual double[] | SolutionParameters [get, set] |
Solution of the prioblem - parameter values in minimum. More... | |
virtual double | SolutionValue [get, set] |
Function value in solution. More... | |
virtual double[] | SolutionGradient [get, set] |
Function gradient in solution. More... | |
virtual int | IterationCount [get, protected set] |
Current iteration number. More... | |
virtual int | Evaluationcount [get, protected set] |
Number of function evaluations performed up to now (usually within the single minimization procedure). More... | |
virtual bool | IsConvergenceCriteriaMet [get] |
Returna a flag telling whether convergence criteria are met. More... | |
Private Attributes | |
int | numHessianCorrections = 2 |
Number of Hessian corrections. More... | |
int | flags = 0 |
Flags used for the LBFGS algorithm. More... | |
Performs minimization of multivariate functions by the LBFGS method.
|
inline |
Constructs a new function mnimizer.
function | Function to be minimized. |
initialGuess | Initial guess. |
maxIterations | Maximal number of iterations. |
tolGrad | Tolerance on norm of function gradient. |
tolValue | Tolerance on error in function value. |
tolParameters | Tolerance on norm of error in parameters. |
This class provides an object-oriented minimization tool. It wraps the AlgLib BFGS algorithm in order to perform the minimization.
References NumLib.MinimizerBase.Function, NumLib.MinimizerBase.InitialGuess, NumLib.MinimizerLbfgs.MaxIterations, NumLib.MinimizerBase.ToleranceFunctionGradient, NumLib.MinimizerBase.ToleranceFunctionValue, and NumLib.MinimizerBase.ToleranceParameters.
|
inlinevirtual |
Initializes the solution iteration.
Implements NumLib.MinimizerBase.
References NumLib.MinimizerBase.InitialGuess, NumLib.MinimizerLbfgs.LbfgsReport, NumLib.MinimizerLbfgs.LbfgsState, NumLib.MinimizerLbfgs.MaxIterations, AlgLib.lbfgs.minlbfgs(), NumLib.MinimizerBase.NumParameters, NumLib.MinimizerBase.OutputLevel, NumLib.MinimizerBase.ToleranceFunctionGradient, NumLib.MinimizerBase.ToleranceFunctionValue, and NumLib.MinimizerBase.ToleranceParameters.
Referenced by NumLib.MinimizerLbfgs.Minimize().
|
inlinevirtual |
Optimization of quadratic functions.
Implements NumLib.MinimizerBase.
References NumLib.MinimizerBase._isConvergenceCriteriaMet, NumLib.FunctionWithGradient.ArrayToString(), NumLib.MinimizerBase.Function, NumLib.FunctionWithGradient.Gradient(), NumLib.MinimizerBase.IterationCount, NumLib.MinimizerLbfgs.LbfgsState, AlgLib.lbfgs.minlbfgsiteration(), NumLib.FunctionWithGradient.Norm(), NumLib.MinimizerBase.OutputLevel, and NumLib.FunctionWithGradient.Value().
Referenced by NumLib.MinimizerLbfgs.Minimize().
|
inlinevirtual |
Optimization of quadratic functions.
Implements NumLib.MinimizerBase.
References NumLib.FunctionWithGradient.ArrayToString(), NumLib.FunctionWithGradient.Description, NumLib.MinimizerBase.Function, NumLib.FunctionWithGradient.Gradient(), NumLib.MinimizerLbfgs.InitializeIteration(), NumLib.MinimizerBase.IsConvergenceCriteriaMet, NumLib.MinimizerBase.IterationCount, NumLib.MinimizerLbfgs.LbfgsReport, NumLib.MinimizerLbfgs.LbfgsState, NumLib.MinimizerLbfgs.MaxIterations, AlgLib.lbfgs.minlbfgsresults(), NumLib.MinimizerLbfgs.NextIteration(), NumLib.FunctionWithGradient.Norm(), NumLib.MinimizerBase.NumParameters, NumLib.MinimizerBase.OutputLevel, NumLib.MinimizerBase.SolutionGradient, NumLib.MinimizerBase.SolutionParameters, NumLib.MinimizerBase.SolutionValue, and NumLib.FunctionWithGradient.Value().
Referenced by NumLib.ExampleAlgLib2008.OptimizeQuadraticWithObject().
|
staticprotected |
|
protected |
|
protected |
LBFGS algorithm's state struct.
Referenced by NumLib.MinimizerLbfgs.InitializeIteration(), NumLib.MinimizerLbfgs.Minimize(), and NumLib.MinimizerLbfgs.NextIteration().
|
protected |
LBFGS algorithm's results.
Referenced by NumLib.MinimizerLbfgs.InitializeIteration(), and NumLib.MinimizerLbfgs.Minimize().
|
private |
Number of Hessian corrections.
|
private |
Flags used for the LBFGS algorithm.
|
staticgetset |
Default value for the maximal number of iterations for the Lbfgs method.
Must be greater or equal to 1.
|
getset |
Maximal number of iterations.
Must be greater or equal to 1.
Default value is defined by the MinimizerLbfgs.DefaultMaxIterationsLbfgs property.
Referenced by NumLib.MinimizerLbfgs.InitializeIteration(), NumLib.MinimizerLbfgs.Minimize(), and NumLib.MinimizerLbfgs.MinimizerLbfgs().