|
9.1.1 HopfieldFit
Hopfield networks are defined with the function HopfieldFit.

Train a Hopfield network.
HopfieldFit returns an object with head Hopfield. The information of the network is stored in the systematic way used by all neural networks of the package, as described in Section 3.2, Package Conventions. The first component is the matrix that contains the parametric weights, as described in Section 2.7, Hopfield Network.
HopfieldFit takes the following options.

Options of HopfieldFit.
The option NetType takes the value Discrete or Continuous, indicating which type of Hopfield network you want to create. Continuous-time Hopfield networks can have two types of neurons, SaturatedLinear or Tanh. You use the option Neuron to indicate your preference. The option WorkingPrecision indicates the precision, the number of decimals, with which the differential Eq. (2.28) in Section 2.7, Hopfield Network, should be solved for continuous Hopfield networks.
A continuous-time Hopfield network stores a few more information items than the discrete-time counterpart. The type of nonlinear activation function, Neuron, WorkingPrecision, and the step size, Dt, for the differential equation must be logged.
The network can be evaluated for the disturbed data vectors using the evaluation rule for Hopfield objects. This means that the equation describing the network, as given in Section 2.7, Hopfield Network, is simulated using the disturbed data vector as an initial state.

Function evaluation of a Hopfield network.
The input argument x can be a vector containing one input sample or a matrix containing one input sample on each row.
The evaluation rule for Hopfield networks has the option Trajectories. By setting this option to True, you obtain not only the final values of the state vectors, but also the trajectories of the states starting at the initial values, supported in the call, and finishing at the final values.

Option of the evaluation rule for Hopfield networks.
|