IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NumLib.MinimizerLbfgs Class Reference

Performs minimization of multivariate functions by the LBFGS method. More...

+ Inheritance diagram for NumLib.MinimizerLbfgs:
+ Collaboration diagram for NumLib.MinimizerLbfgs:

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...
 

Detailed Description

Performs minimization of multivariate functions by the LBFGS method.

Constructor & Destructor Documentation

NumLib.MinimizerLbfgs.MinimizerLbfgs ( FunctionWithGradient  function,
double[]  initialGuess,
int  maxIterations,
double  tolGrad,
double  tolValue,
double  tolParameters 
)
inline

Constructs a new function mnimizer.

Parameters
functionFunction to be minimized.
initialGuessInitial guess.
maxIterationsMaximal number of iterations.
tolGradTolerance on norm of function gradient.
tolValueTolerance on error in function value.
tolParametersTolerance 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.

Member Function Documentation

Member Data Documentation

int NumLib.MinimizerLbfgs._defaultMaxIterationsLbfgs = 500
staticprotected
int NumLib.MinimizerLbfgs._maxIterationsLbfgs = DefaultMaxIterationsLbfgs
protected
lbfgs.lbfgsstate NumLib.MinimizerLbfgs.LbfgsState
protected
lbfgs.lbfgsreport NumLib.MinimizerLbfgs.LbfgsReport
protected

LBFGS algorithm's results.

Referenced by NumLib.MinimizerLbfgs.InitializeIteration(), and NumLib.MinimizerLbfgs.Minimize().

int NumLib.MinimizerLbfgs.numHessianCorrections = 2
private

Number of Hessian corrections.

int NumLib.MinimizerLbfgs.flags = 0
private

Flags used for the LBFGS algorithm.

Property Documentation

int NumLib.MinimizerLbfgs.DefaultMaxIterationsLbfgs
staticgetset

Default value for the maximal number of iterations for the Lbfgs method.

Must be greater or equal to 1.

override int NumLib.MinimizerLbfgs.MaxIterations
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().


The documentation for this class was generated from the following file: