@PublicationReference(author={"William H. Press","Saul A. Teukolsky","William T. Vetterling","Brian P. Flannery"},title="Numerical Recipes in C, Second Edition",type=Book,year=1992,pages={685,687},notes="Section 15.5",url="http://www.nrbook.com/a/bookcpdf.php") @PublicationReference(author="Wikipedia",title="Levenberg-Marquardt algorithm",type=WebPage,year=2008,url="http://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm") public class LevenbergMarquardtEstimation extends LeastSquaresEstimator
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_DAMPING
Default initial value of the damping factor 1.0
|
static double |
DEFAULT_DAMPING_DIVISOR
Divisor of the damping factor on unsuccessful iteration, dividing
damping factor on cost-reducing iteration 10.0
|
static int |
DEFAULT_MAX_ITERATIONS_WITHOUT_IMPROVEMENT
Default maximum number of iterations without improvement before stopping 4
|
DEFAULT_MAX_ITERATIONS, DEFAULT_TOLERANCE
data, keepGoing
maxIterations
DEFAULT_ITERATION, iteration
Constructor and Description |
---|
LevenbergMarquardtEstimation()
Creates a new instance of LevenbergMarquardtEstimation
|
LevenbergMarquardtEstimation(double dampingFactor,
double dampingFactorDivisor,
int maxIterations,
int maxIterationsWithoutImprovement,
double tolerance)
Creates a new instance of LevenbergMarquardtEstimation
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanupAlgorithm()
Called to clean up the learning algorithm's state after learning has
finished.
|
double |
getDampingFactor()
Getter for dampingFactor
|
double |
getDampingFactorDivisor()
Getter for dampingFactorDivisor
|
int |
getIterationsWithoutImprovement()
Getter for iterationsWithoutImprovement
|
int |
getMaxIterationsWithoutImprovement()
Getter for maxIterationsWithoutImprovement
|
protected boolean |
initializeAlgorithm()
Called to initialize the learning algorithm's state based on the
data that is stored in the data field.
|
void |
setDampingFactor(double dampingFactor)
Setter for dampingFactor
|
void |
setDampingFactorDivisor(double dampingFactorDivisor)
Setter for dampingFactorDivisor
|
void |
setIterationsWithoutImprovement(int iterationsWithoutImprovement)
Setter for iterationsWithoutImprovement
|
void |
setMaxIterationsWithoutImprovement(int maxIterationsWithoutImprovement)
Setter for maxIterationsWithoutImprovement
|
protected boolean |
step()
Called to take a single step of the learning algorithm.
|
getCostFunction, getObjectToOptimize, getPerformance, getResult, getResultCost, getTolerance, setCostFunction, setObjectToOptimize, setResult, setResultCost, setTolerance
clone, getData, getKeepGoing, learn, setData, setKeepGoing, stop
getMaxIterations, isResultValid, setMaxIterations
addIterativeAlgorithmListener, fireAlgorithmEnded, fireAlgorithmStarted, fireStepEnded, fireStepStarted, getIteration, getListeners, removeIterativeAlgorithmListener, setIteration, setListeners
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
learn
clone
getMaxIterations, setMaxIterations
addIterativeAlgorithmListener, getIteration, removeIterativeAlgorithmListener
isResultValid, stop
public static final double DEFAULT_DAMPING
public static final double DEFAULT_DAMPING_DIVISOR
public static final int DEFAULT_MAX_ITERATIONS_WITHOUT_IMPROVEMENT
public LevenbergMarquardtEstimation()
public LevenbergMarquardtEstimation(double dampingFactor, double dampingFactorDivisor, int maxIterations, int maxIterationsWithoutImprovement, double tolerance)
dampingFactor
- Current damping factor for the ridge regressiondampingFactorDivisor
- Divisor of the damping factor on a successful iteration, must be greater
then 1.0, typically ~10.0maxIterations
- Maximum iterations before stoppingmaxIterationsWithoutImprovement
- Number of sequential unsuccessful iterations without a cost-reducing steptolerance
- Stopping criterion for the algorithm, typically ~1e-5protected boolean initializeAlgorithm()
AbstractAnytimeBatchLearner
initializeAlgorithm
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>
protected boolean step()
AbstractAnytimeBatchLearner
step
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>
protected void cleanupAlgorithm()
AbstractAnytimeBatchLearner
cleanupAlgorithm
in class AbstractAnytimeBatchLearner<java.util.Collection<? extends InputOutputPair<? extends Vector,Vector>>,GradientDescendable>
public int getIterationsWithoutImprovement()
public void setIterationsWithoutImprovement(int iterationsWithoutImprovement)
iterationsWithoutImprovement
- Number of sequential unsuccessful iterations without a cost-reducing steppublic int getMaxIterationsWithoutImprovement()
public void setMaxIterationsWithoutImprovement(int maxIterationsWithoutImprovement)
maxIterationsWithoutImprovement
- Maximum number of iterations without improvement before stoppingpublic double getDampingFactor()
public void setDampingFactor(double dampingFactor)
dampingFactor
- Current damping factor for the ridge regressionpublic double getDampingFactorDivisor()
public void setDampingFactorDivisor(double dampingFactorDivisor)
dampingFactorDivisor
- Divisor of the damping factor on a successful iteration, must be greater
then 1.0, typically ~10.0