Class LevenbergDampened
- java.lang.Object
-
- org.ddogleg.optimization.impl.LevenbergBase
-
- org.ddogleg.optimization.impl.LevenbergDenseBase
-
- org.ddogleg.optimization.impl.LevenbergDampened
-
public class LevenbergDampened extends LevenbergDenseBase
Implementation of Levenberg's algorithm which explicitly computes the J(x)'J(x) matrix and iteratively adjusts the dampening parameter. If a candidate sample point decreases the score then it is accepted ad the dampening parameter adjusted according to [1]. Because it immediately accepts any decrease it will tend to require more function and gradient calculations and less linear solutions. Explicitly computing J(x)'J(x) improves the linear solver's speed at the cost of some numerical precision.
The step 'x' is computed using the following formula: (J(k)'*J(k) + μ*I)x = -g = -J'*f
where J is the Jacobian, μ is the damping coefficient, I is an identify matrix, g is the gradient, f is the functions output.Unlike some implementations, the option for a scaling matrix is not provided. Scaling can be done inside the function itself and would add even more complexity to the code. The dampening parameter is updated using the equation below from [1]:
damp = damp * max( 1/3 , 1 - (2*ratio-1)^3 )
where ratio is the actual reduction over the predicted reduction.[1] K. Madsen and H. B. Nielsen and O. Tingleff, "Methods for Non-Linear Least Squares Problems (2nd ed.)" Informatics and Mathematical Modelling, Technical University of Denmark
-
-
Constructor Summary
Constructors Constructor and Description LevenbergDampened(double initialDampParam)Specifies termination condition and dampening parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidsetFunction(CoupledJacobian function)Specifies function being optimized.-
Methods inherited from class org.ddogleg.optimization.impl.LevenbergBase
addToMessage, getFnorm, getIterationCount, getMessage, getParameters, initialize, isConverged, isUpdatedParameters, iterate, setConvergence, setInitialDampParam
-
-
-
-
Constructor Detail
-
LevenbergDampened
public LevenbergDampened(double initialDampParam)
Specifies termination condition and dampening parameter- Parameters:
initialDampParam- Initial value of the dampening parameter. Tune.. try 1e-3;
-
-
Method Detail
-
setFunction
public void setFunction(CoupledJacobian function)
Specifies function being optimized.- Overrides:
setFunctionin classLevenbergDenseBase- Parameters:
function- Computes residuals and Jacobian.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG