Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Delta rule aka backpropagation algorithm.
- type TrainPat = (Pattern, Pattern)
- train :: Brain -> Double -> [TrainPat] -> Brain
- trainAtomic :: Brain -> Double -> [TrainPat] -> Brain
- trainPat :: Brain -> Double -> TrainPat -> Brain
- learnPat :: Brain -> Double -> TrainPat -> ConnMatrix
- totalError :: Brain -> [TrainPat] -> Double
- tpList :: [Double] -> [Double] -> (Pattern, Pattern)
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.