hnn-0.1: A minimal Haskell Neural Network LibraryContentsIndex
AI.HNN.Layer
Contents
Layer creation
Computation
Learning
Quadratic Error
Description
Layer module, defining functions to work on a neural network layer, which is a list of neurons
Synopsis
createSigmoidLayerU :: Int -> Double -> UArr Double -> [Neuron]
createHeavysideLayerU :: Int -> Double -> UArr Double -> [Neuron]
createSigmoidLayer :: Int -> Double -> [Double] -> [Neuron]
createHeavysideLayer :: Int -> Double -> [Double] -> [Neuron]
computeLayerU :: [Neuron] -> UArr Double -> UArr Double
computeLayer :: [Neuron] -> [Double] -> [Double]
learnSampleLayerU :: Double -> [Neuron] -> (UArr Double, UArr Double) -> [Neuron]
learnSampleLayer :: Double -> [Neuron] -> ([Double], [Double]) -> [Neuron]
learnSamplesLayerU :: Double -> [Neuron] -> [(UArr Double, UArr Double)] -> [Neuron]
learnSamplesLayer :: Double -> [Neuron] -> [([Double], [Double])] -> [Neuron]
quadErrorU :: [Neuron] -> (UArr Double, UArr Double) -> Double
quadError :: [Neuron] -> ([Double], [Double]) -> Double
Layer creation
createSigmoidLayerU :: Int -> Double -> UArr Double -> [Neuron]
Creates a layer compound of n neurons with the Sigmoid transfer function, all having the given threshold and weights.
createHeavysideLayerU :: Int -> Double -> UArr Double -> [Neuron]
Creates a layer compound of n neurons with the Heavyside transfer function, all having the given threshold and weights.
createSigmoidLayer :: Int -> Double -> [Double] -> [Neuron]
Creates a layer compound of n neurons with the sigmoid transfer function, all having the given threshold and weights.
createHeavysideLayer :: Int -> Double -> [Double] -> [Neuron]
Creates a layer compound of n neurons with the sigmoid transfer function, all having the given threshold and weights.
Computation
computeLayerU :: [Neuron] -> UArr Double -> UArr Double
Computes the outputs of each Neuron of the layer
computeLayer :: [Neuron] -> [Double] -> [Double]
Computes the outputs of each Neuron of the layer
Learning
learnSampleLayerU :: Double -> [Neuron] -> (UArr Double, UArr Double) -> [Neuron]
Trains each neuron with the given sample and the given learning ratio
learnSampleLayer :: Double -> [Neuron] -> ([Double], [Double]) -> [Neuron]
Trains each neuron with the given sample and the given learning ratio
learnSamplesLayerU :: Double -> [Neuron] -> [(UArr Double, UArr Double)] -> [Neuron]
Trains each neuron with the given samples and the given learning ratio
learnSamplesLayer :: Double -> [Neuron] -> [([Double], [Double])] -> [Neuron]
Trains each neuron with the given samples and the given learning ratio
Quadratic Error
quadErrorU :: [Neuron] -> (UArr Double, UArr Double) -> Double
Returns the quadratic error of a layer for a given sample
quadError :: [Neuron] -> ([Double], [Double]) -> Double
Returns the quadratic error of a layer for a given sample
Produced by Haddock version 2.4.2