Maintainer | Ertugrul Soeylemez <[email protected]> |
---|
AI.Instinct.Brain
Description
This module provides artifical neural networks.
- data Brain = Brain {}
- type Pattern = Vector Double
- data NetInit = InitMLP {
- mlpActFunc :: Activation
- mlpLayers :: [Int]
- buildNet :: NetInit -> IO Brain
- runNet :: Brain -> Pattern -> Pattern
- runNetList :: Brain -> [Double] -> [Double]
- activation :: Brain -> Pattern -> Vector Double
- netInput :: Brain -> Pattern -> Vector Double
- netInputFrom :: Brain -> Vector Double -> Pattern -> Vector Double
- listPat :: [Double] -> Pattern
- patError :: Pattern -> Pattern -> Double
Brains
A Brain
value is an aritifical neural network.
Constructors
Brain | |
Fields
|
Initialization
Network builder configuration. See buildNet
.
Constructors
InitMLP | Recipe for a multi-layer perceptron. This is a neural network, which is made up of neuron layers, where adjacent layers are (in this case fully) connected. |
Fields
|
High level
runNet :: Brain -> Pattern -> PatternSource
Pass the given input pattern through the given neural network and return its output.
runNetList :: Brain -> [Double] -> [Double]Source
Low level
activation :: Brain -> Pattern -> Vector DoubleSource
Feeds the given input vector into the network and calculates the activation vector.
netInput :: Brain -> Pattern -> Vector DoubleSource
Calculate the net input vector, i.e. the values just before applying the activation function.
netInputFrom :: Brain -> Vector Double -> Pattern -> Vector DoubleSource
Calculate the net input vector from the given activation vector.