Class Hopfield

  • All Implemented Interfaces:
    java.io.Serializable

    public class Hopfield
    extends UnsupervisedLearning
    Hopfield's networks are the most important and most applicable recurrent neural network. This Hopfield networks uses an deterministic unsupervised training algorithm and a bipolar encoding for the training patterns and answers. As the Hebb network this network is a associative memory. The main goal of this network is memorize and retrieve the memorized patterns without noise.
    See Also:
    Serialized Form
    • Constructor Detail

      • Hopfield

        public Hopfield​(int inputs)
        Constructor. Receives the number of input to the network.
        Parameters:
        inputs - The number of input to the network.
    • Method Detail

      • train

        public void train​(Column[] patterns,
                          double alpha,
                          int epochs,
                          int offset,
                          int length)
        Train the network. The answers, alpha, epochs and minerror are meaningless in this algorithm.
        Specified by:
        train in class UnsupervisedLearning
        Parameters:
        patterns - The patterns to be learned.
        alpha - The learning rate. [ignored]
        epochs - The maximum number of iterations. [ignored]
        offset - The first pattern position.
        length - How many patterns will be used.
      • simulate

        public Column simulate​(Column pattern)
        Description copied from class: NeuralNetwork
        Calculates the output for the pattern.
        Specified by:
        simulate in class NeuralNetwork
        Parameters:
        pattern - Pattern to use as input.
        Returns:
        The output for the neural network.
      • simulate

        public void simulate​(Column pattern,
                             Column result)
        Description copied from class: NeuralNetwork
        Calculates the output for the pattern and left the result in result.
        Specified by:
        simulate in class NeuralNetwork
        Parameters:
        pattern - Pattern to use as input.
        result - The output for the input.