Class LevenbergMarquardtTraining

  • All Implemented Interfaces:

    public class LevenbergMarquardtTrainingextends BasicTraining
    Trains a neural network using a Levenberg Marquardt algorithm (LMA). This training technique is based on the mathematical technique of the same name. http://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm The LMA training technique has some important limitations that you should be aware of, before using it. Only neural networks that have a single output neuron can be used with this training technique. The entire training set must be loaded into memory. Because of this an Indexable training set must be used. However, despite these limitations, the LMA training technique can be a very effective training method. References: - http://www-alg.ist.hokudai.ac.jp/~jan/alpha.pdf - http://www.inference.phy.cam.ac.uk/mackay/Bayes_FAQ.html ---------------------------------------------------------------- This implementation of the Levenberg Marquardt algorithm is based heavily on code published in an article by Cesar Roberto de Souza. The original article can be found here: http://crsouza.blogspot.com/2009/11/neural-network-learning-by-levenberg_18.html Portions of this class are under the following copyright/license. Copyright 2009 by Cesar Roberto de Souza, Released under the LGPL.
    • Field Detail


        public static final double SCALE_LAMBDA
        The amount to scale the lambda by.
        See Also:
        Constant Field Values
      • LAMBDA_MAX

        public static final double LAMBDA_MAX
        The max amount for the LAMBDA.
        See Also:
        Constant Field Values
      • NUM_POINTS

        public static final int NUM_POINTS
        Number of points for finite difference.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LevenbergMarquardtTraining

        public LevenbergMarquardtTraining(BasicNetwork network,                          MLDataSet training)
        Construct the LMA object.
        network - The network to train. Must have a single output neuron.
        training - The training data to use. Must be indexable.
    • Method Detail

      • trace

        public static double trace(double[][] m)
        Return the sum of the diagonal.
        m - The matrix to sum.
        The trace of the matrix.
      • calculateHessian

        public void calculateHessian()
        Calculate the Hessian matrix.
      • canContinue

        public boolean canContinue()
        True if the training can be paused, and later continued.
      • getMethod

        public MLMethod getMethod()
        Description copied from interface: MLTrain
        Get the current best machine learning method from the training.
        The trained network.
      • iteration

        public void iteration()
        Perform one iteration.
      • pause

        public TrainingContinuation pause()
        Pause the training to continue later.
        A training continuation object.
      • resume

        public void resume(TrainingContinuation state)
        Resume training.
        state - The training continuation object to use to continue.
      • updateWeights

        public void updateWeights()
        Update the weights.

SCaVis 2.2 © jWork.ORG