Documentation of 'org.encog.ml.ea.train.basic.TrainEA' Java class
TrainEA
org.encog.ml.ea.train.basic

Class TrainEA

    • Constructor Detail

      • TrainEA

        public TrainEA(Population thePopulation,
                       CalculateScore theScoreFunction)
        Create a trainer for a score function.
        Parameters:
        thePopulation - The population.
        theScoreFunction - The score function.
      • TrainEA

        public TrainEA(Population thePopulation,
                       MLDataSet trainingData)
        Create a trainer for training data.
        Parameters:
        thePopulation - The population.
        trainingData - The training data.
    • Method Detail

      • setError

        public void setError(double error)
        Not used.
        Specified by:
        setError in interface MLTrain
        Parameters:
        error - Not used.
      • 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.
      • pause

        public TrainingContinuation pause()
        Pause the training to continue later.
        Specified by:
        pause in interface MLTrain
        Returns:
        A training continuation object.
      • resume

        public void resume(TrainingContinuation state)
        Resume training.
        Specified by:
        resume in interface MLTrain
        Parameters:
        state - The training continuation object to use to continue.
      • 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.
      • canContinue

        public boolean canContinue()
        Specified by:
        canContinue in interface MLTrain
        Returns:
        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.
        Specified by:
        getMethod in interface MLTrain
        Returns:
        A network created for the best genome.
      • getTraining

        public MLDataSet getTraining()
        Returns null, does not use a training set, rather uses a score function.
        Specified by:
        getTraining in interface MLTrain
        Returns:
        null, not used.
      • getStrategies

        public java.util.List<Strategy> getStrategies()
        Specified by:
        getStrategies in interface MLTrain
        Returns:
        The strategies to use.
      • postIteration

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

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

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.