Class Adaline

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    RBF

    public class Adaline
    extends Perceptron
    Adaptative Linear neural network. Is a special case of the single layer Perceptron. Uses a identity as exit function. The only difference between the training algorithms is the 2*alpha multiplication. Because of this, the Adaline implementation is a subclass of Perceptron single layer.
    See Also:
    Serialized Form
    • Constructor Detail

      • Adaline

        public Adaline​(int ins,
                       int outs)
        Constructor.
        Parameters:
        ins - Number of inputs for the network = number of elements in the patterns.
        outs - Number of outputs for the network.
      • Adaline

        public Adaline​(int ins,
                       int outs,
                       java.util.Random rand)
        Constructor.
        Parameters:
        ins - Number of inputs for the network = number of elements in the patterns.
        outs - Number of outputs for the network.
        rand - Random generator used for creating matrices
    • Method Detail

      • train

        public void train​(Column[] patterns,
                          Column[] answers,
                          double alpha,
                          int epochs,
                          int offset,
                          int length,
                          double minerror)
        Alias of super.train(patterns, answers, 2*alpha, epochs, offset, length, minerror);
        Overrides:
        train in class Perceptron
        Parameters:
        patterns - The patterns to be learned.
        answers - The expected answers.
        alpha - The learning rate.
        epochs - The maximum number of iterations
        offset - The first pattern position
        length - How many patterns will be used.
        minerror - The minimal error expected.
      • simulate

        public void simulate​(Column pattern,
                             Column result)
        Calculate the output for the pattern and left the result on result. result = W * pattern + b
        Overrides:
        simulate in class Perceptron
        Parameters:
        pattern - The input pattern
        result - The output result.