gov.sandia.cognition.learning.algorithm.minimization
Class MinimizationStoppingCriterion

java.lang.Object
  extended by gov.sandia.cognition.learning.algorithm.minimization.MinimizationStoppingCriterion

public class MinimizationStoppingCriterion
extends Object

Implementation of almost zero-gradient convergence test for function minimizers.

Since:
2.1
Author:
Kevin R. Dixon

Constructor Summary
MinimizationStoppingCriterion()
           
 
Method Summary
static boolean convergence(Vector xnew, Double fxnew, Vector gradient, Vector delta, double tolerance)
          Tests for convergence on approximately zero slope and nonmovement along the x-axis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinimizationStoppingCriterion

public MinimizationStoppingCriterion()
Method Detail

convergence

public static boolean convergence(Vector xnew,
                                  Double fxnew,
                                  Vector gradient,
                                  Vector delta,
                                  double tolerance)
Tests for convergence on approximately zero slope and nonmovement along the x-axis

Parameters:
xnew - Present x-axis value
fxnew - Present y-value at xnew, may be null if unknown
gradient - Gradient at the new point
delta - Change in x-axis between iterations
tolerance - Tolerance of the stopping criterion, typically ~1e-5
Returns:
True if converged, false otherwise