instinct-0.1.0: Fast artifical neural networks

MaintainerErtugrul Soeylemez <es@ertes.de>

AI.Instinct.Train.Delta

Contents

Description

Delta rule aka backpropagation algorithm.

Synopsis

Backpropagation training

type TrainPat = (Pattern, Pattern)Source

A training pattern is a tuple of an input pattern and an expected output pattern.

train :: Brain -> Double -> [TrainPat] -> BrainSource

Non-atomic version of trainAtomic. Will adjust the weights for each pattern instead of at the end of the epoch.

trainAtomic :: Brain -> Double -> [TrainPat] -> BrainSource

Train a list of patterns with the specified learning rate. This will adjust the weights at the end of the epoch. Returns an updated neural network and the new total error.

trainPat :: Brain -> Double -> TrainPat -> BrainSource

Train a single pattern. The second argument specifies the learning rate.

Low level

learnPat :: Brain -> Double -> TrainPat -> ConnMatrixSource

Calculate the weight deltas and the total error for a single pattern. The second argument specifies the learning rate.

Utility functions

totalError :: Brain -> [TrainPat] -> DoubleSource

Calculate the total error of a neural network with respect to the given list of training patterns.

tpList :: [Double] -> [Double] -> (Pattern, Pattern)Source

Convenience function: Construct a training pattern from an input and output vector.