hnn-0.1: A minimal Haskell Neural Network Library

AI.HNN.Net

Contents

Description

Net module, defining functions to work on a neural network, which is a list of list of neurons

Synopsis

Documentation

nn :: [[Neuron]] -> [[Neuron]]Source

Computation

computeNetU :: [[Neuron]] -> UArr Double -> UArr DoubleSource

Computes the output of the given neural net on the given inputs

computeNet :: [[Neuron]] -> [Double] -> [Double]Source

Computes the output of the given neural net on the given inputs

Quadratic Error

quadErrorNetU :: [[Neuron]] -> (UArr Double, UArr Double) -> DoubleSource

Returns the quadratic error of the neural network on the given sample

quadErrorNet :: [[Neuron]] -> ([Double], [Double]) -> DoubleSource

Returns the quadratic error of the neural network on the given sample

globalQuadErrorNetU :: [[Neuron]] -> [(UArr Double, UArr Double)] -> DoubleSource

Returns the quadratic error of the neural network on the given samples

globalQuadErrorNet :: [[Neuron]] -> [([Double], [Double])] -> DoubleSource

Returns the quadratic error of the neural network on the given samples

Learning

backPropU :: Double -> [[Neuron]] -> (UArr Double, UArr Double) -> [[Neuron]]Source

Train the given neural network using the backpropagation algorithm on the given sample with the given learning ratio (alpha)

backProp :: Double -> [[Neuron]] -> ([Double], [Double]) -> [[Neuron]]Source

Train the given neural network using the backpropagation algorithm on the given sample with the given learning ratio (alpha)

trainU :: Double -> Double -> [[Neuron]] -> [(UArr Double, UArr Double)] -> [[Neuron]]Source

Train the given neural network on the given samples using the backpropagation algorithm using the given learning ratio (alpha) and the given desired maximal bound for the global quadratic error on the samples (epsilon)

train :: Double -> Double -> [[Neuron]] -> [([Double], [Double])] -> [[Neuron]]Source

Train the given neural network on the given samples using the backpropagation algorithm using the given learning ratio (alpha) and the given desired maximal bound for the global quadratic error on the samples (epsilon)