Safe Haskell | None |
---|
Implementation of Hopfield Network training and asssociating
- data HopfieldNet = HopfieldNet {}
- initializeWith :: Matrix Float -> HopfieldNet
- activity :: Float -> Float
- train :: HopfieldNet -> Matrix Float -> HopfieldNet
- associate :: MonadRandom m => HopfieldNet -> Int -> Vector Float -> m (Vector Float)
- energy :: HopfieldNet -> Float
Documentation
data HopfieldNet Source
HopfieldNet maintains the state and weights of the Hopfield Network, and is the major datastructure used in this code.
initializeWith :: Matrix Float -> HopfieldNetSource
Initializes the HopfieldNet with the given training patterns.
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.