THE PROCESS OF ADJUSTING WEIGHTS
 

 

 

 

 

 

 

 

 

 

 

 

 

This process of adjusting weights is sensitive to the representation of the data going in. For instance, consider a field in the data that measures lot size. If lot size is measured in acres, then the values might reasonably go from about 1⁄ 8 to 1 acre. If measured in square feet, the same values would be 5,445 square feet to 43,560 square feet. However, for technical reasons, neural networks restrict their inputs to small numbers, say between -1 and 1. For instance, when an input variable takes on very large values relative to other inputs, then this variable dominates the calculation of the target. The neural network wastes valuable iterations by reducing the weights on this input to lessen its effect on the output. That is, the first “pattern” that the network will find is that the lot size variable has much larger values than other variables. Since this is not particularly interesting, it would be better to use the lot size as measured in acres rather than square feet. This idea generalizes. Usually, the inputs in the neural network should be smallish numbers. It is a good idea to limit them to some small range, such as -1 to 1, which requires mapping all the values, both continuous and categorical prior to training the network.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

One way to map continuous values is to turn them into fractions by sub­ tracting the middle value of the range from the value, dividing the result by the size of the range, and multiplying by 2. For instance, to get a mapped value for 218 Chapter 7 Year_Built (1923), subtract (1850 + 1986)/2 = 1918 (the middle value) from 1923 (the year the oldest house was built) and get 7. Dividing by the number of years in the range (1986 - 1850 + 1 = 137) yields a scaled value and multiplying by 2 yields a value of 0.0730. This basic procedure can be applied to any continuous feature to get a value between -1 and 1. One way to map categorical features is to assign fractions between -1 and 1 to each of the categories. The only categor­ ical variable in this data is Heating_Type, so we can arbitrarily map B 1 and A to -1. If we had three values, we could assign one to -1, another to 0, and the third to 1, although this approach does have the drawback that the three heating types will seem to have an order. Type -1 will appear closer to type 0 than to type 1.ways to convert categorical variables to numeric variables without adding spurious information. With these simple techniques, it is possible to map all the fields for the sam ple house record shown earlier (see Table 7.2) and train the network. Training is a process of iterating through the training set to adjust the weights. Each iteration is sometimes called a generation.