Newton Conjugate Gradient Optimizer Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
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
| Newton | Constructs a Newton-CG optimizer. |
Properties
| Conjugate | Gets the number of inner conjugate-gradient iterations in the last solve. |
| Convergence |
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) |
| Estimated |
Gets a value indicating the size of the absolute
error of the result.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Evaluations |
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>) |
| Extremum |
Gets or sets the type of extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
| Fast |
Gets or sets the function that computes the gradient of the objective funciton.
(Inherited from MultidimensionalOptimizer) |
| Gradient |
Gets the number of evaluations of the gradient of the objective function.
(Inherited from MultidimensionalOptimizer) |
| Gradient |
Gets or sets the function that computes the gradient of the objective funciton.
(Inherited from MultidimensionalOptimizer) |
| Gradient |
Gets the VectorConvergenceTest<T> that uses the gradient of the objective function.
(Inherited from MultidimensionalOptimizer) |
| Gradient |
Gets or sets the current value of the gradient.
(Inherited from MultidimensionalOptimizer) |
| Has |
Indicates whether the degree of parallelism is a property that is shared
across instances.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Hessian | Gets or sets the function that evaluates the objective Hessian as a linear operator. |
| Hessian | Gets or sets a callback that writes the original objective Hessian diagonal. |
| Hessian | Gets the number of Hessian-vector products in the last solve. |
| History | Gets or sets the number of secant pairs used by history preconditioning. The default is ten. |
| Initial |
Gets or sets the initial value for the iteration.
(Inherited from MultidimensionalOptimizer) |
| Iterations |
Gets the number of iterations needed by the
algorithm to reach the desired accuracy.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Lower | Gets or sets optional variable lower bounds. |
| Max |
Gets or sets the maximum degree of parallelism enabled by this instance.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Max |
Gets or sets the maximum number of evaluations during the calculation.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Max | Gets or sets the maximum number of iterations
to use when approximating the roots of the target
function.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Min |
Gets or sets the minimum iterations that have to be performed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Objective |
Gets or sets the objective function.
(Inherited from MultidimensionalOptimizer) |
| Objective |
Gets or sets a function that evaluates the value and gradient
of the objective function.
(Inherited from MultidimensionalOptimizer) |
| Optimality | Gets or sets the positive tolerance for final optimality checks. The default is 1e-6. |
| Parallel |
Gets or sets the configuration for the parallel behavior of the algorithm.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Preconditioning | Gets or sets the Newton-system preconditioner. |
| Result |
Gets the result of an algorithm after it has executed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Solution |
Gets the result of an algorithm after it has executed.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Solution |
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>) |
| Symbolic |
Gets or sets the objective function.
(Inherited from MultidimensionalOptimizer) |
| Throw |
Gets or sets whether to throw an
exception when the algorithm fails to converge.
(Inherited from ManagedIterativeAlgorithm<T, TError, TReport>) |
| Upper | Gets or sets optional variable upper bounds. |
| Use | Gets or sets whether to use backtracking for unbounded Newton steps. The default is false. |
| Value |
Gets the original objective value at the current approximation to the extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
| Value |
Gets the SimpleConvergenceTest<T> that uses the value of the target functions.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
Methods
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Find |
Searches for an extremum.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
| Find |
Searches for a maximum.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
| Find |
Searches for a minimum.
(Inherited from MultidimensionalOptimizer<T, TReport>) |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |