Class Propagation

    • Constructor Detail

      • Propagation

        public Propagation(ContainsFlat network,           MLDataSet training)
        Construct a propagation object.
        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
        finishTraining in class BasicTraining
      • getCurrentFlatNetwork

        public FlatNetwork getCurrentFlatNetwork()
        the currentFlatNetwork
      • getMethod

        public MLMethod getMethod()
        Get the current best machine learning method from the training.
        Specified by:
        getMethod in interface MLTrain
        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
        iteration in class BasicTraining
        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
        numThreads - The number of threads.
      • getThreadCount

        public int getThreadCount()
        Specified by:
        getThreadCount in interface MultiThreadable
        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:
        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.
        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.
        gradients - The gradients.
        lastGradient - The last gradients.
        index - The index.
        The update value.
      • getLastGradient

        public double[] getLastGradient()
        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
        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
        theBatchSize - The batch size.

SCaVis 2.0 © jWork.ORG