Package weka.core

# Class ConjugateGradientOptimization

java.lang.Object
weka.core.Optimization
weka.core.ConjugateGradientOptimization

All Implemented Interfaces:
  `RevisionHandler`, `TechnicalInformationHandler`

public abstract class ConjugateGradientOptimization extends Optimization implements RevisionHandler
This subclass of Optimization.java implements conjugate gradient descent rather than BFGS updates, by overriding findArgmin(), with the same tests for convergence, and applies the same line search code. Note that constraints are NOT actually supported. Using this class instead of Optimization.java can reduce runtime when there are many parameters. Uses the second hybrid method proposed in "An Efficient Hybrid Conjugate Gradient Method for Unconstrained Optimization" by Dai and Yuan (2001). See also information in the getTechnicalInformation() method.

Version:
  $Revision: 10203 $
Author:
  Eibe Frank

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConjugateGradientOptimization()`
  Constructor that sets MAXITS to 2000 by default and the parameter in the second weak Wolfe condition to 0.1.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `double[]`
  `findArgmin(double[] initX, double[][] constraints)`
  Main algorithm.
  `TechnicalInformation`
  `getTechnicalInformation()`
  Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.

  ### Methods inherited from class weka.core.Optimization

  `getMinFunction, getVarbValues, lnsrch, setDebug, setMaxIteration, solveTriangle`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface weka.core.RevisionHandler

  `getRevision`

- ## Constructor Details

  - ### ConjugateGradientOptimization

    public ConjugateGradientOptimization()
    Constructor that sets MAXITS to 2000 by default and the parameter in the second weak Wolfe condition to 0.1.

- ## Method Details

  - ### getTechnicalInformation

    public TechnicalInformation getTechnicalInformation()
    Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
    Specified by:
      `getTechnicalInformation` in interface `TechnicalInformationHandler`
    Overrides:
      `getTechnicalInformation` in class `Optimization`
    Returns:
      the technical information about this class

  - ### findArgmin

    public double[] findArgmin(double[] initX, double[][] constraints) throws Exception
    Main algorithm. NOTE: constraints are not actually supported.
    Overrides:
      `findArgmin` in class `Optimization`
    Parameters:
      `initX` - initial point of x, assuming no value's on the bound!
      `constraints` - both arrays must contain Double.NaN
    Returns:
      the solution of x, null if number of iterations not enough
    Throws:
      `Exception` - if an error occurs