Propagation
org.encog.neural.networks.training.propagation

Class Propagation

    • Constructor Detail

      • Propagation

        public Propagation(ContainsFlat network,           MLDataSet training)
        Construct a propagation object.
        Parameters:
        network - The network.
        training - The training set.
    • Method Detail

      • 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
        Overrides:
        finishTraining in class BasicTraining
      • getCurrentFlatNetwork

        public FlatNetwork getCurrentFlatNetwork()
        Returns:
        the currentFlatNetwork
      • getMethod

        public MLMethod getMethod()
        Get the current best machine learning method from the training.
        Specified by:
        getMethod in interface MLTrain
        Returns:
        The best machine learningm method.
      • iteration

        public void iteration()
        Perform one training iteration.
        Specified by:
        iteration in interface MLTrain
      • rollIteration

        public void rollIteration()
        Increase the iteration by one.
      • iteration

        public void iteration(int count)
        Perform the specified number of training iterations. This can be more efficient than single training iterations. This is particularly true if you are training with a GPU.
        Specified by:
        iteration in interface MLTrain
        Overrides:
        iteration in class BasicTraining
        Parameters:
        count - The number of training iterations.
      • setThreadCount

        public void setThreadCount(int numThreads)
        Set the number of threads. Specify zero to tell Encog to automatically determine the best number of threads for the processor. If OpenCL is used as the target device, then this value is not used.
        Specified by:
        setThreadCount in interface MultiThreadable
        Parameters:
        numThreads - The number of threads.
      • getThreadCount

        public int getThreadCount()
        Specified by:
        getThreadCount in interface MultiThreadable
        Returns:
        The number of threads to use, 0 to automatically determine based on core count.
      • fixFlatSpot

        public void fixFlatSpot(boolean b)
        Default is true. Call this with false to disable flat spot fix. For more info on flat spot: http://www.heatonresearch.com/wiki/Flat_Spot
        Parameters:
        b - True to fix flat spots, false otherwise.
      • setErrorFunction

        public void setErrorFunction(ErrorFunction ef)
      • calculateGradients

        public void calculateGradients()
        Calculate the gradients.
      • report

        public void report(double[] gradients,          double error,          Throwable ex)
        Called by the worker threads to report the progress at each step.
        Parameters:
        gradients - The gradients from that worker.
        error - The error for that worker.
        ex - The exception.
      • initOthers

        public abstract void initOthers()
      • updateWeight

        public abstract double updateWeight(double[] gradients,                  double[] lastGradient,                  int index)
        Update a weight, the means by which weights are updated vary depending on the training.
        Parameters:
        gradients - The gradients.
        lastGradient - The last gradients.
        index - The index.
        Returns:
        The update value.
      • getLastGradient

        public double[] getLastGradient()
        Returns:
        the lastGradient
      • getBatchSize

        public int getBatchSize()
        The batch size. Specify 1 for pure online training. Specify 0 for pure batch training (complete training set in one batch). Otherwise specify the batch size for batch training.
        Specified by:
        getBatchSize in interface BatchSize
        Returns:
        The batch size.
      • setBatchSize

        public void setBatchSize(int theBatchSize)
        Set the batch size. Specify 1 for pure online training. Specify 0 for pure batch training (complete training set in one batch). Otherwise specify the batch size for batch training.
        Specified by:
        setBatchSize in interface BatchSize
        Parameters:
        theBatchSize - The batch size.

SCaVis 1.8 © jWork.org