org.akutan.optimization
Class LMSolver

java.lang.Object
  extended by org.akutan.optimization.LMSolver

public class LMSolver
extends java.lang.Object

This class minimizes the objective function subject to the Levenberg-Marquardt algorithm. The specific steps are taken from Fletcher second edition.

Since:
10 May 2007

Field Summary
protected  double _termCondition
          This value seems to good enough for the test cases
protected  int _trace
          Trace level, higher number for more logging
 
Constructor Summary
LMSolver()
           
 
Method Summary
protected  cern.colt.matrix.DoubleMatrix2D make2D(cern.colt.matrix.DoubleMatrix1D v)
          Helper function that returns a (x,1) 2D matrix given a (x) vector
 void setTrace(int t)
          Set the trace level
 cern.colt.matrix.DoubleMatrix1D solve(LMObjective objective, cern.colt.matrix.DoubleMatrix1D x0)
          Solves the cost function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_termCondition

protected double _termCondition
This value seems to good enough for the test cases


_trace

protected int _trace
Trace level, higher number for more logging

Constructor Detail

LMSolver

public LMSolver()
Method Detail

setTrace

public void setTrace(int t)
Set the trace level

Parameters:
t - The trace level to set

make2D

protected cern.colt.matrix.DoubleMatrix2D make2D(cern.colt.matrix.DoubleMatrix1D v)
Helper function that returns a (x,1) 2D matrix given a (x) vector

Parameters:
v - The vector to convert into a 1 column matrix
Returns:
The 1 column matrix identical to v

solve

public cern.colt.matrix.DoubleMatrix1D solve(LMObjective objective,
                                             cern.colt.matrix.DoubleMatrix1D x0)
Solves the cost function. Fletcher uses x4, but it doesn't seem to work unless I use x10.

Parameters:
objective - Cost or Objective function to be minimized
x0 - Vector of initial x values for the starting point of the minimization.
Returns:
The solution point which minimizes the object function subject to the constraints