|
||
|
||
Home : Mendelsohn's Library : Neural Networks
MATLAB Neural Network Toolbox
THE MATH WORKS INC. The Neural Network Toolbox is one of 15 application-specific software toolboxes designed to run in the MATLAB technical computing environment. (See the product review for MATLAB for Windows 4.0.) Designed as a tool for industry, education and research, it provides the user with a means of developing various neural networks and graphically analyzing both their training process and results. When installed, the functions that the Toolbox provides are seamlessly integrated into MATLAB. The Neural Network Toolbox is composed of a number of M-files, which are the standard script and function files for MATLAB, which in turn are written in ASCII. This means that the user can directly examine the inner workings of all the toolbox functions and examples. Using these files as guides, the user can experiment with the Toolbox to become familiar with the product. The MATLAB Neural Network Toolbox has not attempted to provide a definitive set of neural network functions. Instead, due to the rapidly developing nature of the field, the goal has been to provide the user with all the necessary elements for network development and exploration, so that he or she can find what works and what doesn't for a specific application. The Neural Network Toolbox comes with an excellent user's guide filled with a wide variety of examples. Each example is also included in the Toolbox itself so it can be run in MATLAB, while the user follows along in the guide. The manner in which these examples are presented, coupled with the fact that the user can examine the code that executes them, allows the user to become proficient with the Toolbox's capabilities. THE HARD FACTS The transfer function for a given neuron provides the means by which the inputs of that neuron are converted to outputs with desired characteristics. Available transfer functions in the Toolbox include competitive layer, hard limit, symmetric hard limit, log-sigmoid, linear, saturated linear and tan-sigmoid functions. One of the most commonly used transfer functions is the log-sigmoid function, which is used to scale the input of a neuron from the range of plus or minus infinity to the range of zero to one. In addition, because it is differentiable, it is commonly used in back-propagation networks, one of the most widely used training paradigms. In addition, custom-tailored transfer functions can be created by the user. The learning rules provided in the Toolbox are designed to alter the weights and biases of the network neurons. These rules include perception, Widrow-Hoff, back-propagation, associative learning, competitive learning, feature maps and Hopfield. The user is also able to create an entirely new learning rule or one that is a combination of the learning rules provided. The Neural Network Toolbox also provides a number of enhancements to the back-propagation paradigm, which include the addition of a momentum term, a method for improving initial weight conditions and an adaptive learning rate. Such features have been shown to increase training speeds on some problems. In addition, The Math Works is also working on the next version of the Toolbox, with new features to include a significant speed improvement in training back propagation networks plus the addition of two new paradigms, radial basis functions and learning vector quantization. At present, the new release is stated for January 1994. The training functions, of course, vary from one type of learning to the next, but all require similar information to perform the training task -- typically, an initial weight matrix, the initial bias vector, a matrix of input vectors, target vectors, the number of epochs between sampling of the error for display, the maximum number of epochs to train, the error goal of the network and the learning rate. The training function then returns new weights and biases once the maximum number of epochs has been reached or the network error has dropped below a preset error goal. TRAINING A NETWORK GRAPHING Since MATLAB's graphs can change dynamically, it is possible to view network information graphically during the training process. For instance, one of the examples included with the Toolbox performs function optimization using back-propagation. Figure 2 depicts the network output for this example before training has begun. Figure 3 shows the network output at epoch 2,000. The network output after 6,000 epochs can be seen in Figure 4. With MATLAB'S graphic capabilities, the user can observe network performance like this as it occurs. In addition to MATLAB's display and plotting capabilities, the Neural Network Toolbox includes specialized graphing functions. The ploterr function plots the sum-squared error of a network against the training epochs, while the plotlr function plots the adaptive learning rate of a network against the training epochs. A feature map diagram for a layer of neurons can be plotted using the plotmap function, and the hintonw function plots a Hinton diagram, which graphically displays the elements of a weight matrix. Figure 5 shows the Hinton diagram for the first layer of a four-input, three-hidden neuron network. The area of each square is proportional to the magnitude of the weight connection between the input and hidden neurons associated with that square. Positive weights are distinguished by a plus through the square. This type of diagram is designed to help make the relative significance of elements in a large weight matrix more apparent, thus making it easier to see which weights have the greatest effect on a neuron's output. These methods of monitoring the training of a network and displaying the end results graphically give the user an opportunity to visualize information that may not be obvious when presented in a numerical format. SUMMARY Lou Mendelsohn, 813 973-0496, fax 813 973-2700, is president of Market Technologies , Wesley Chapel, FL., a research, software development and consulting firm involved in the application of artificial intelligence to financial market analysis. Reprinted from Technical Analysis of
Want to see how you can use VantagePoint |