Top Description Methods
org.apache.commons.math3.optim.nonlinear.scalar.gradient

public Interface Preconditioner

Known Direct Implementers
org.apache.commons.math3.optim.nonlinear.scalar.gradient.NonLinearConjugateGradientOptimizer.IdentityPreconditioner

This interface represents a preconditioner for differentiable scalar objective function optimizers.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public double[]

Returns:

approximation of H-1r where H is the objective function hessian
precondition
(double[]
current point at which the search direction was computed
point
,
double[]
raw search direction (i.e. opposite of the gradient)
r
)

Precondition a search direction.

Method Detail

preconditionback to summary
public double[] precondition(double[] point, double[] r)

Precondition a search direction.

The returned preconditioned search direction must be computed fast or the algorithm performances will drop drastically. A classical approach is to compute only the diagonal elements of the hessian and to divide the raw search direction by these elements if they are all positive. If at least one of them is negative, it is safer to return a clone of the raw search direction as if the hessian was the identity matrix. The rationale for this simplified choice is that a negative diagonal element means the current point is far from the optimum and preconditioning will not be efficient anyway in this case.

Parameters
point:double[]

current point at which the search direction was computed

r:double[]

raw search direction (i.e. opposite of the gradient)

Returns:double[]

approximation of H-1r where H is the objective function hessian