hopfield-networks-0.1.0.0: Hopfield Networks for unsupervised learning in Haskell

Safe HaskellNone

MachineLearning.Hopfield

Description

Implementation of Hopfield Network training and asssociating

Synopsis

Documentation

data HopfieldNet Source

HopfieldNet maintains the state and weights of the Hopfield Network, and is the major datastructure used in this code.

Constructors

HopfieldNet 

Instances

initializeWith :: Matrix Float -> HopfieldNetSource

Initializes the HopfieldNet with the given training patterns.

activity :: Float -> FloatSource

Maps the activation of a neuron to the output.

train :: HopfieldNet -> Matrix Float -> HopfieldNetSource

Updates the weights of the Hopfield network with the given training patterns.

associate :: MonadRandom m => HopfieldNet -> Int -> Vector Float -> m (Vector Float)Source

Repeatedly adjusts the Hopfield network's state to minimize the energy of the current configuration.

energy :: HopfieldNet -> FloatSource

The energy of the current configuration of the Hopfield network.