BasicTraining
org.encog.ml.train

Class BasicTraining

    • Method Detail

      • addStrategy

        public void addStrategy(Strategy strategy)
        Training strategies can be added to improve the training results. There are a number to choose from, and several can be used at once.
        Specified by:
        addStrategy in interface MLTrain
        Parameters:
        strategy - The strategy to add.
      • finishTraining

        public void finishTraining()
        Should be called after training has completed and the iteration method will not be called any further.
        Specified by:
        finishTraining in interface MLTrain
      • getError

        public double getError()
        Get the current error percent from the training.
        Specified by:
        getError in interface MLTrain
        Returns:
        The current error.
      • getIteration

        public int getIteration()
        Specified by:
        getIteration in interface MLTrain
        Returns:
        the iteration
      • isTrainingDone

        public boolean isTrainingDone()
        Specified by:
        isTrainingDone in interface MLTrain
        Returns:
        True if training can progress no further.
      • iteration

        public void iteration(int count)
        Perform the specified number of training iterations. This is a basic implementation that just calls iteration the specified number of times. However, some training methods, particularly with the GPU, benefit greatly by calling with higher numbers than 1.
        Specified by:
        iteration in interface MLTrain
        Parameters:
        count - The number of training iterations.
      • postIteration

        public void postIteration()
        Call the strategies after an iteration.
      • preIteration

        public void preIteration()
        Call the strategies before an iteration.
      • setError

        public void setError(double error)
        Specified by:
        setError in interface MLTrain
        Parameters:
        error - Set the current error rate. This is usually used by training strategies.
      • setIteration

        public void setIteration(int iteration)
        Description copied from interface: MLTrain
        Set the current training iteration.
        Specified by:
        setIteration in interface MLTrain
        Parameters:
        iteration - the iteration to set
      • setTraining

        public void setTraining(MLDataSet training)
        Set the training object that this strategy is working with.
        Parameters:
        training - The training object.

SCaVis 2.0 © jWork.ORG