Class AbstractMinimizer

  • All Implemented Interfaces:
    Minimizer
    Direct Known Subclasses:
    Fmincg, GradientDescent, OWLQN, ParticleSwarmOptimization

    public abstract class AbstractMinimizer
    extends java.lang.Object
    implements Minimizer
    Abstract minimizer class that adds functionality that can be shared between many minimizers. Currently it has just a iteration completion callback facility, but can be later extended to share line searching code or other shared utilities.
    Author:
    thomas.jungblut
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addIterationCompletionCallback​(IterationCompletionListener lst)
      Add a callback listener that triggers after a iteration.
      protected void onIterationFinished​(int iteration, double cost, de.jungblut.math.DoubleVector currentWeights)
      Callback method that should be called from an explicit subclass once an iteration was finished.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractMinimizer

        public AbstractMinimizer()
    • Method Detail

      • addIterationCompletionCallback

        public void addIterationCompletionCallback​(IterationCompletionListener lst)
        Add a callback listener that triggers after a iteration.
        Parameters:
        lst - the iteration completion listener.
      • onIterationFinished

        protected final void onIterationFinished​(int iteration,
                                                 double cost,
                                                 de.jungblut.math.DoubleVector currentWeights)
        Callback method that should be called from an explicit subclass once an iteration was finished.
        Parameters:
        iteration - the number of the current iteration.
        cost - the cost at the current iteration.
        currentWeights - the current optimal weights.