NewtonConjugateGradientOptimizer Class

Finds a local extremum using Newton steps computed with conjugate gradients.

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public sealed class NewtonConjugateGradientOptimizer : MultidimensionalOptimizer
Inheritance
Object  →  ManagedIterativeAlgorithm<Vector<Double>, Double, OptimizationSolutionReport>  →  MultidimensionalOptimizer<Vector<Double>, OptimizationSolutionReport>  →  MultidimensionalOptimizer  →  NewtonConjugateGradientOptimizer

Remarks

Supply first derivatives and a Hessian function returning a matrix or a multiplication-only linear operator. Optional bounds are enforced throughout the solve. The optimizer uses Hessian-vector products without reconstructing a dense Hessian.

A supplied curvature approximation, such as Gauss-Newton for a sum of squared residuals, may replace exact Hessian products or entries. Use the original objective sign, and keep the objective and gradient callbacks exact. Final first-order checks apply to those callbacks.

Successful termination requires bound feasibility, projected stationarity and complementarity. Custom convergence tests add stopping conditions; a small value or step change alone cannot certify a solution. A stationary point of a nonconvex function is not a global optimum certificate.

Constructors

NewtonConjugateGradientOptimizerConstructs a Newton-CG optimizer.

Properties

ConjugateGradientIterationsNeededGets the number of inner conjugate-gradient iterations in the last solve.
ConvergenceTests Gets the collection of convergence tests for the algorithm.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
Dimensions Gets or sets the number of dimensions of the optimization problem.
(Inherited from MultidimensionalOptimizer)
EstimatedError Gets a value indicating the size of the absolute error of the result.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
EvaluationsNeeded Gets the number of evaluations needed to execute the algorithm.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
Extremum Gets or sets the current best approximation to the extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
ExtremumType Gets or sets the type of extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
FastGradientFunction Gets or sets the function that computes the gradient of the objective funciton.
(Inherited from MultidimensionalOptimizer)
GradientEvaluationsNeeded Gets the number of evaluations of the gradient of the objective function.
(Inherited from MultidimensionalOptimizer)
GradientFunction Gets or sets the function that computes the gradient of the objective funciton.
(Inherited from MultidimensionalOptimizer)
GradientTest Gets the VectorConvergenceTest<T> that uses the gradient of the objective function.
(Inherited from MultidimensionalOptimizer)
GradientVector Gets or sets the current value of the gradient.
(Inherited from MultidimensionalOptimizer)
HasSharedDegreeOfParallelism Indicates whether the degree of parallelism is a property that is shared across instances.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
HessianGets or sets the function that evaluates the objective Hessian as a linear operator.
HessianDiagonalGets or sets a callback that writes the original objective Hessian diagonal.
HessianProductsNeededGets the number of Hessian-vector products in the last solve.
HistorySizeGets or sets the number of secant pairs used by history preconditioning. The default is ten.
InitialGuess Gets or sets the initial value for the iteration.
(Inherited from MultidimensionalOptimizer)
IterationsNeeded Gets the number of iterations needed by the algorithm to reach the desired accuracy.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
LowerBoundsGets or sets optional variable lower bounds.
MaxDegreeOfParallelism Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
MaxEvaluations Gets or sets the maximum number of evaluations during the calculation.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
MaxIterationsGets or sets the maximum number of iterations to use when approximating the roots of the target function.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
MinIterations Gets or sets the minimum iterations that have to be performed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
ObjectiveFunction Gets or sets the objective function.
(Inherited from MultidimensionalOptimizer)
ObjectiveFunctionWithGradient Gets or sets a function that evaluates the value and gradient of the objective function.
(Inherited from MultidimensionalOptimizer)
OptimalityToleranceGets or sets the positive tolerance for final optimality checks. The default is 1e-6.
ParallelOptions Gets or sets the configuration for the parallel behavior of the algorithm.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
PreconditioningMethodGets or sets the Newton-system preconditioner.
Result Gets the result of an algorithm after it has executed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
SolutionReport Gets the result of an algorithm after it has executed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
SolutionTest Gets the VectorConvergenceTest<T> that uses the approximate solution.
(Inherited from MultidimensionalOptimizer)
Status Gets the AlgorithmStatus following an execution of the algorithm.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
SymbolicObjectiveFunction Gets or sets the objective function.
(Inherited from MultidimensionalOptimizer)
ThrowExceptionOnFailure Gets or sets whether to throw an exception when the algorithm fails to converge.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>)
UpperBoundsGets or sets optional variable upper bounds.
UseLineSearchGets or sets whether to use backtracking for unbounded Newton steps. The default is false.
ValueAtExtremum Gets the original objective value at the current approximation to the extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
ValueTest Gets the SimpleConvergenceTest<T> that uses the value of the target functions.
(Inherited from MultidimensionalOptimizer<T, TReport>)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FindExtremum Searches for an extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
FindMaximum Searches for a maximum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
FindMinimum Searches for a minimum.
(Inherited from MultidimensionalOptimizer<T, TReport>)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also