ConjugateGradient Class 
Namespace: Accord.Math.Optimization
public class ConjugateGradient : BaseGradientOptimizationMethod, IGradientOptimizationMethod, IOptimizationMethod, IOptimizationMethod<double[], double>, IGradientOptimizationMethod<double[], double>, IFunctionOptimizationMethod<double[], double>, IOptimizationMethod<ConjugateGradientCode>, IOptimizationMethod<double[], double, ConjugateGradientCode>, ISupportsCancellation
The ConjugateGradient type exposes the following members.
Name  Description  

ConjugateGradient 
Creates a new instance of the CG optimization algorithm.
 
ConjugateGradient(Int32) 
Creates a new instance of the CG optimization algorithm.
 
ConjugateGradient(Int32, FuncDouble, Double, FuncDouble, Double) 
Creates a new instance of the CG optimization algorithm.

Name  Description  

Evaluations 
Gets the number of function evaluations performed
in the last call to Minimize.
 
Function 
Gets or sets the function to be optimized.
(Inherited from BaseOptimizationMethod.)  
Gradient 
Gets or sets a function returning the gradient
vector of the function to be optimized for a
given value of its free parameters.
(Inherited from BaseGradientOptimizationMethod.)  
Iterations 
Gets the number of iterations performed
in the last call to Minimize.
 
MaxIterations 
Gets or sets the maximum number of iterations
to be performed during optimization. Default
is 0 (iterate until convergence).
 
Method 
Gets or sets the conjugate gradient update
method to be used during optimization.
 
NumberOfVariables 
Gets the number of variables (free parameters)
in the optimization problem.
(Inherited from BaseOptimizationMethod.)  
Searches 
Gets the number of linear searches performed
in the last call to Minimize.
 
Solution 
Gets the current solution found, the values of
the parameters which optimizes the function.
(Inherited from BaseOptimizationMethod.)  
Status  
Token 
Gets or sets a cancellation token that can be used to
stop the learning algorithm while it is running.
(Inherited from BaseOptimizationMethod.)  
Tolerance 
Gets or sets the relative difference threshold
to be used as stopping criteria between two
iterations. Default is 0 (iterate until convergence).
 
Value 
Gets the output of the function at the current Solution.
(Inherited from BaseOptimizationMethod.) 
Name  Description  

Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.)  
Finalize  Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)  
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
GetType  Gets the Type of the current instance. (Inherited from Object.)  
Maximize 
Finds the maximum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseGradientOptimizationMethod.)  
Maximize(Double) 
Finds the maximum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseOptimizationMethod.)  
MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)  
Minimize 
Finds the minimum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseGradientOptimizationMethod.)  
Minimize(Double) 
Finds the minimum value of a function. The solution vector
will be made available at the Solution property.
(Inherited from BaseOptimizationMethod.)  
OnNumberOfVariablesChanged 
Called when the NumberOfVariables property has changed.
(Overrides BaseOptimizationMethodOnNumberOfVariablesChanged(Int32).)  
Optimize 
Implements the actual optimization algorithm. This
method should try to minimize the objective function.
(Overrides BaseOptimizationMethodOptimize.)  
ToString  Returns a string that represents the current object. (Inherited from Object.) 
Name  Description  

HasMethod 
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)  
IsEqual 
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.)  
To(Type)  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) 
In mathematics, the conjugate gradient method is an algorithm for the numerical solution of particular systems of linear equations, namely those whose matrix is symmetric and positive definite. The conjugate gradient method is an iterative method, so it can be applied to sparse systems that are too large to be handled by direct methods. Such systems often arise when numerically solving partial differential equations. The nonlinear conjugate gradient method generalizes the conjugate gradient method to nonlinear optimization (Wikipedia, 2011).
T
The framework implementation of this method is based on the original FORTRAN source code by Jorge Nocedal (see references below). The original FORTRAN source code of CG+ (for large scale unconstrained problems) is available at http://users.eecs.northwestern.edu/~nocedal/CG+.html and had been made freely available for educational or commercial use. The original authors expect that all publications describing work using this software quote the (Gilbert and Nocedal, 1992) reference given below.
References: