Module to initialize connections between layers, i.e weight and bias values. Also normalizes weight values.
First the random number generator seed is initialized to the variable randomseed if it's defined, and to an nondeterministic number (current time of day) otherwise. Then all weight and bias values are randomized within weightLim using the function rand (see Section 5).
Additionally, the arrays msErr and allstopper , containing the mean squared error and criterion values accumulated during training respectively, are initialized to empty arrays here.
The weights and biases are then optionally normalized. For this purpose the weight values are divided by the fan-in of the units that they are targeting. For the hidden layer units, the fan-in would be numInputs , and for the output layer, would be numHids [Hassoun95, p. 242].
Variables holding the weight and bias values are defined as matrices and are listed here as follows (see [Hagan96, pp. 2-3 to 2-13 ] for an introduction of matrix representation of networks):