A Hopfield network is a type of neural network commonly used for pattern recognition. In this notebook, the Hopfield net is evaluated based on its capacity to recall patterns using either the Hebbian or Storkey learning rules.
To create the network, an array of
If the learning rule is set as the Storkey learning rule, weights are determined through the equations below, where
When the network is run, its initial state is set as the input pattern and the energy of the whole network calculated, where
The state