Package pal.math

Class ConjugateGradientSearch


  • public class ConjugateGradientSearch
    extends MultivariateMinimum
    minimization of a real-valued function of several variables using a the nonlinear conjugate gradient method where several variants of the direction update are available (Fletcher-Reeves, Polak-Ribiere, Beale-Sorenson, Hestenes-Stiefel) and bounds are respected. Gradients are computed numerically if they are not supplied by the user. The line search is entirely based on derivative evaluation, similar to the strategy used in macopt (Mackay).
    Version:
    $Id: ConjugateGradientSearch.java,v 1.7 2002/10/27 05:46:28 matt Exp $
    Author:
    Korbinian Strimmer
    • Field Detail

      • BEALE_SORENSON_HESTENES_STIEFEL_UPDATE

        public static final int BEALE_SORENSON_HESTENES_STIEFEL_UPDATE
        See Also:
        Constant Field Values
      • prin

        public int prin
        controls the printed output from the routine (0 -> no output, 1 -> print only starting and final values, 2 -> detailed map of the minimisation process), the default value is 0
      • defaultStep

        public double defaultStep
        defaultStep is a steplength parameter and should be set equal to the expected distance from the solution (in a line search) exceptionally small or large values of defaultStep lead to slower convergence on the first few iterations (the step length itself is adapted during search), the default value is 1.0
      • conjugateGradientStyle

        public int conjugateGradientStyle
        conjugateGradientStyle determines the method for the conjugate gradient direction update update (0 -> Fletcher-Reeves, 1 -> Polak-Ribiere, 2 -> Beale-Sorenson, Hestenes-Stiefel), the default is 2.
    • Constructor Detail

      • ConjugateGradientSearch

        public ConjugateGradientSearch()
      • ConjugateGradientSearch

        public ConjugateGradientSearch​(int conGradStyle)
    • Method Detail

      • optimize

        public void optimize​(MultivariateFunction f,
                             double[] x,
                             double tolfx,
                             double tolx)
        Description copied from class: MultivariateMinimum
        The actual optimization routine (needs to be implemented in a subclass of MultivariateMinimum). It finds a minimum close to vector x when the absolute tolerance for each parameter is specified.
        Specified by:
        optimize in class MultivariateMinimum
        Parameters:
        f - multivariate function
        x - initial guesses for the minimum (contains the location of the minimum on return)
        tolfx - absolute tolerance of function value
        tolx - absolute tolerance of each parameter
      • optimize

        public void optimize​(MultivariateFunction f,
                             double[] x,
                             double tolfx,
                             double tolx,
                             MinimiserMonitor monitor)
        Description copied from class: MultivariateMinimum
        The actual optimization routine It finds a minimum close to vector x when the absolute tolerance for each parameter is specified.
        Overrides:
        optimize in class MultivariateMinimum
        Parameters:
        f - multivariate function
        x - initial guesses for the minimum (contains the location of the minimum on return)
        tolfx - absolute tolerance of function value
        tolx - absolute tolerance of each parameter
        monitor - A monitor object that receives information about the minimising process (for display purposes)