HopfieldNetwork
org.encog.neural.thermal

Class HopfieldNetwork

    • Constructor Detail

      • HopfieldNetwork

        public HopfieldNetwork()
        Default constructor.
      • HopfieldNetwork

        public HopfieldNetwork(int neuronCount)
        Construct a Hopfield with the specified neuron count.
        Parameters:
        neuronCount - The neuron count.
    • Method Detail

      • addPattern

        public final void addPattern(MLData pattern)
        Train the neural network for the specified pattern. The neural network can be trained for more than one pattern. To do this simply call the train method more than once.
        Parameters:
        pattern - The pattern to train for.
      • compute

        public final MLData compute(MLData input)
        Note: for Hopfield networks, you will usually want to call the "run" method to compute the output. This method can be used to copy the input data to the current state. A single iteration is then run, and the new current state is returned.
        Parameters:
        input - The input pattern.
        Returns:
        The new current state.
      • getInputCount

        public final int getInputCount()
        Returns:
        The input.
      • getOutputCount

        public final int getOutputCount()
        Returns:
        The output count.
      • run

        public final void run()
        Perform one Hopfield iteration.
      • runUntilStable

        public final int runUntilStable(int max)
        Run the network until it becomes stable and does not change from more runs.
        Parameters:
        max - The maximum number of cycles to run before giving up.
        Returns:
        The number of cycles that were run.

SCaVis 2.1 © jWork.ORG