hfann-0.2: Haskell binding to the FANN library

Portabilityportable
Stabilityexperimental
Maintainerolivier.boudry@gmail.com

HFANN.Data

Contents

Description

The Fast Artificial Neural Network Library (FANN) is a free open source neural network library written in C with support for both fully connected and sparsely connected networks (http://leenissen.dk/fann/).

HFANN is a Haskell interface to this library.

Synopsis

Data Types

type FannType = DoubleSource

The Haskell input/output type

This is the data type used in Haskell to represent the input/output data.

type CFannType = CDoubleSource

The C input/output type

This is the data type used in the C library to represent the input/output data.

type CFannTypePtr = Ptr CDoubleSource

A pointer to the C input/output type

type ActivationFunction = Word32Source

The type of the Activation Function enumeration

type TrainAlgorithm = Word32Source

The type of the Training Algorithm enumeration

type ErrorFunction = Word32Source

Error function used during training.

errorFunctionLinear - Standard linear error function. errorFunctionTanH - Tanh error function, usually better but can require a lower learning rate. This error function agressively target outputs that differ much from the desired, while not targetting output that only differ a little that much.

The tanh function is not recommended for cascade training and incremental training.

type StopFunction = Word32Source

Stop function used during training

stopFunctionMSE - stop criteria is Mean Square Error value. stopFunctionBit - stop criteria is number of bits that fail

See getBitFailLimit, setBitFailLimit.

The bits are counted in all of the training data, so this number can be higher than the number of training data.

data Fann Source

The ANN structure

Constructors

Fann 

type FannPtr = Ptr FannSource

A pointer to an ANN structure

data TrainData Source

Data type of the training data structure

Constructors

TrainData 

type TrainDataPtr = Ptr TrainDataSource

A pointer to the training data structure type

type CallbackType = FannPtr -> TrainDataPtr -> Int -> Int -> Float -> Int -> IO BoolSource

The Haskell Callback function type

type CCallbackType = FannPtr -> TrainDataPtr -> CUInt -> CUInt -> CFloat -> CUInt -> IO IntSource

The C callback function type

Activation Functions

activationGaussianStepwise :: ActivationFunctionSource

Create a callback function to be used during training for reporting and to stop the training

Training Algorithms

Error Functions

Stop Functions

Callback