WebCab Optimization for COM v2.6

MultiDimensionalSolver.DerivPolakRiviere Method 

Find the location of a local extremum (i.e. minimum or maximum) of a differentiable multidimensional function using the Polak-Riviere algorithm.

public double[] DerivPolakRiviere(
   ExtremumTypes extremumType,
   double[] initialPoint,
   BracketingAlgorithm bracketingAlgorithm,
   LocateAlgorithm locateAlgorithm,
   double minDistance,
   double bracketingParameter,
   double tolerance,
   int maxIterations,
   double fractionalTolerance
);

Parameters

extremumType
Indicates the type of extreme searched: in the case of a minimum, extremumType == ExtremumTypes.MINIMUM; and in the case of a maximum, extremumType == ExtremumTypes.MAXIMUM.
initialPoint
The initial point about which the iterative optimization procedure starts. The initial point is given as an array where the n-th term of the array corresponds to the value of the n coordinate value.
bracketingAlgorithm
The bracketing algorithm used within this method. We recommend in most cases that the AccelDerivBracketing bracketing algorithm is used. See the remarks given above, the PDF documentation or the examples for more information on selecting the most appropriate Bracketing Algorithm.
locateAlgorithm
The locate algorithm used within this method. We recommend in most cases that the CubicDerivLocate locate algorithms is used. See the remarks given above, the PDF documentation or the examples for more information on selecting the most appropriate Locate Algorithm.
minDistance
This parameter is required by all bracketing algorithms, and usually signifies the minimal distance between the end points of any bracketed interval in which the extremum lies. Therefore, the minDistance parameter should be approximately the same magnitude as tolerance parameter.
bracketingParameter
This parameter is required by some bracketing algorithms. For a detailed explanation as to its meaning and use for particular bracketing algorithms selected please see the documentation of the BracketingAlgorithm selected or the Mathematical Documentation chapter of the accompanying PDF documentation.
tolerance
The tolerance used when the exit condition of this iterative algorithm is checked. The smaller the tolerance used the more stable the convergence to the extremum within the iterative algorithm must be before the exit condition is trigger. Hence the smaller the tolerance generally the more accuracy the result, however it also has the draw back of making the algorithm more computationally demanding. A reasonable value to use for the tolerance is 0.1.
maxIterations
The maximum number of iterative steps taken before the algorithm exits and a TooManyMultiDimensionalIterationsException is thrown. A reasonable number to use for this parameter is 300.
fractionalTolerance
When the difference between the function values in two consecutive steps is less than fractionalTolerance, the point in the last step is considered a local extreme and returned. In most cases a reasonable value to take for this parameter is 0.0001, however if the object function in very oscillatory in a neighborhood of its extremum then a correspondingly larger value should be used.

Return Value

the point (an N-dimensional vector) where the function has a local extremum.

Remarks

Overview

This is a variable metric method which is generally much more efficient than the Steepest Descent (see DerivSteepestDescent) method.

This algorithm proceeds to find an extremum by applying at each step a unidimensional minimization algorithm, which is determined by the selection of a Bracketing (see BracketingAlgorithm) and Locate (see LocateAlgorithm) Algorithms. The accuracy of the Locate algorithm chosen will not effect the precision of the final results but only the speed with which it is found.

It is recommended that you use AccelDerivBracketing and CubicDerivLocate.

Exiting Conditions

After this algorithm has be run it will exit when one of the following two conditions has been satisfied:

  1. Extremum found to the given level of tolerance set within the algorithm.
  2. Maximum number of Iterations reached: If maxIterations is exceeded, then TooManyMultiDimensionalIterationsException is thrown resulting in the algorithm exiting.
Either way the algorithm is certain to exit. If the algorithm exits because the number of iterations has been exceeded then you have the option to re-run the algorithm with either a large number of iterations allowed and/or a higher level of tolerance allow.

Exceptions

Exception TypeCondition
TooManyMultiDimensionalIterationsExceptionThrown if a number of steps greater than maxIterations is necessary in order to obtain the desired tolerance.
InvalidMultiDimensionalFunctionExceptionThrown if the user function returns invalid values like infinity or NaN.
MultiDimensionalExceptionThrown if the delivered function does not implement Gradient or an interface which extends Gradient.

See Also

MultiDimensionalSolver Class | WebCab.COM.Math.Optimization.MultiDimensional Namespace