Class BasicTraining

    • Constructor Detail

      • BasicTraining

        public BasicTraining()
        Used for serialization.
    • 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
        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()
        Specified by:
        getError in interface MLTrain
        Returns the training error. This value is calculated as the training data is evaluated by the iteration function. This has two important ramifications. First, the value returned by getError() is meaningless prior to a call to iteration. Secondly, the error is calculated BEFORE training is applied by the call to iteration. The timing of the error calculation is done for performance reasons.
      • getIteration

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

        public boolean isTrainingDone()
        Specified by:
        isTrainingDone in interface MLTrain
        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
        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
        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
        iteration - the iteration to set
      • setTraining

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

SCaVis 1.8 ©