| Book Name: | Introduction to Neural Networks for C#, 2nd Edition |
| ISBN: | 1604390093 |
| Author: | Jeff Heaton |
| Pages: | 428 |
| Status: | Available |
- p62-63 - The rows and columns of the matrixes got inverted. The following text describes how it should be represented.
Equation 2.1: A Weight Matrix
[1 3 5]
[2 4 6]
The weight matrix can be defined in Java as follows:
Matrix weightMatrix = new Matrix(2,3);
The threshold variable is not multidimensional, like the weight matrix. There is one threshold value per neuron. Each neuron in the second layer
has an individual threshold value. These values can be stored in an array of Java double variables. The following code shows how the
entire memory of the two layers can be defined.
Matrix weightMatrix = new Matrix(2,3);
double[] thresholds = new double[3];
These declarations include both the 2x3 matrix and the three threshold values for the second layer. There is no need to store threshold values for the first layer, since it is
not connected to another layer. Weight matrix and threshold values are only stored for the connections between two layers, not for each layer.
The preferred method for storing these values is to combine the thresholds with the weights in a combined matrix. The above matrix has two rows and three columns.
The thresholds can be thought of as the third row of the weight matrix, which can be defined as follows:
Matrix weightMatrix = new Matrix(3,3);
The combined threshold and weight matrix is described in Equation 2.2. In this equation, the variable w represents the cells used to store weights and the variable t
represents the cells used to hold thresholds.
Equation 2.2: A Threshold and Weight Matrix
[w w w]
[w w w]
[t t t]
Think you found an error?
If so, please
contact us.
Copyright 2005 - 2010 by Heaton Research, Inc.. Heaton Research and Encog are trademarks of Heaton Research. Click here for copyright and trademark information.