Class UnsupervisedLearning

    • Constructor Detail

      • UnsupervisedLearning

        public UnsupervisedLearning()
      • UnsupervisedLearning

        public UnsupervisedLearning​(java.util.Random rand)
    • Method Detail

      • train

        public abstract void train​(Column[] patterns,
                                   double alpha,
                                   int epochs,
                                   int offset,
                                   int length)
        Trains this neural network with the list of patterns and the expected answers.

        Use the learning rate alpha for many epochs. Take length patterns from the position offset.

        patterns must be array of non-null column matrices

        Parameters:
        patterns - The patterns to be learned.
        alpha - The learning rate.
        epochs - The maximum number of iterations
        offset - The first pattern position
        length - How many patterns will be used.
      • train

        public void train​(Column[] patterns,
                          Column[] answers,
                          double alpha,
                          int epochs,
                          int offset,
                          int length,
                          double minerror)
        Description copied from class: NeuralNetwork
        Trains this neural network with the list of patterns and the expected answers.

        Use the learning rate alpha for many epochs. Take length patterns from the position offset until the minerror is reached.

        patterns and answers must be arrays of non-null column matrices

        Specified by:
        train in class NeuralNetwork
        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.
      • validatePreconditions

        protected void validatePreconditions​(Column[] patterns,
                                             int epochs,
                                             int offset,
                                             int length)