Trio of powerful AI packages simplifies applications of neural networks and genetic algorithms
By W. B. Roush
Neural networks and genetic algorithms are rapidly becoming tools of choice for the analysis of complex data and systems. However, there is a mystique about neural networks and genetic algorithms that precludes some investigators from using the methods in modeling and analysis. Savage  writes about "Consumer Analytics" for promoting the acceptance and understanding of mathematical technology. The Ward Systems Group is promoting the acceptance of artificial intelligence (AI) technology by packaging three of their powerful programs, NeuroShell Predictor, NeuroShell Classifier and GeneHunter, together to form AI Trilogy. AI Trilogy is designed to simplify artificial neural networks and genetic algorithms for application to complex data.
AI Trilogy is on one CD and is installed with examples, a help file and a run-time server. The run-time server allows the incorporation of neural networks into spreadsheets and computer programs for distribution. Although each of the programs are separate and therefore can be run independently, the run-time server will allow the three programs to work together.
In general, neural networks for prediction and classification allow the user to model the interrelationship between inputs and outputs where the functional relationships may not be well defined. NeuroShell Predictor is used for predicting or forecasting continuous numeric values. NeuroShell Classifier is used for classification or categorization problems. GeneHunter, with its genetic algorithm, can be used to optimize both neural network models and mathematical functions.
My acquaintance with artificial neural networks came about during the late 1980s. I attended several workshops and seminars on neural networks. The mystery of neural networks was promoted with reference to neurons, transfer functions, slabs, layers and so forth. I was looking for an intuitive explanation of what neural networks could accomplish. It was not until I purchased a copy of NeuroShell 2 from the Ward Systems Group in the early 1990s that I came to an understanding that neural networks are a highly nonlinear alternative to regression analysis.
Through reading the Ward Systems' Manuals and taking a three-day workshop, I found that the difference between artificial neural networks and regression analysis is that a linear equation is not required, multiple outputs are possible, tighter fits of data are possible, and it is possible to work with "noisy" data. I was impressed with the idea of using an independent test set (from the training set of data) to avoid the over fitting of the neural network model. It was also emphasized that once the neural network was developed with the training and test data sets, it is important to apply the neural network to a production or validation data set.
Our lab has used neural networks to work with nonlinear biological data for predicting the amino acid contents and metabolizable energy values of food ingredients and the diagnosis of diseases based on physiological inputs. We have worked with several agricultural companies who are interested in the application of neural networks. I have found that, in general, these companies are interested in a user-friendly approach to neural networks that does not require an in-depth understanding of the mathematical principles of neural networks. Ward Systems provides such software in their NeuroShell Predictor and NeuroShell Classifier products.
For this review, AI Trilogy was evaluated using a Gateway 2000 computer. The computer has a Pentium Pro processor with 64 MB RAM on Microsoft Windows 95. Installation was quick, smooth and logical. Hardware requirements are listed as an IBM PC or compatible computer with a 486 or higher processor and 16 MB of RAM. NeuroShell Predictor and Classifier are 32-bit programs that require Microsoft Windows 95, 98, Windows 2000 or Windows NT(SP3 or higher). They do not run on Windows 3.1.
NeuroShell Run-time Dynamic Link Library (DLL) works with 32-bit programming languages with OLE automation such as Microsoft Visual Basic, C, C++, FORTRAN and Pascal. Ward Systems encourages the preferential use of Visual Basic to create OLE client applications. The GeneHunter Add-In for Excel works with release 7, Excel 97 and Excel 2000.
The Ward Systems Group provides several ways to learn more about neural networks, genetic algorithms and applied examples of each of their software programs (www.Wardsystems.com.). Their Web site gives an introduction to the use of neural networks and genetic algorithms to solve many types of applied problems. The user manual is included in the help file of AI Trilogy and can be printed. The Predictor and Classifier programs are user-friendly enough that it really is not necessary to have a manual to get started.
NeuroShell Predictor and Classifier
Ward Systems provides guidance through an "Instructor" which gives step-by-step instructions for training a neural network. The following is a tour through the Predictor and Classifier "Instructor" Steps. During the development process, the Help button can be used for any questions.
Steps 1-3 involve the import of the data to be analyzed. Sample data is provided in an Example file. It is possible to have 150 input variables; however, there is only one output variable. NeuroShell Classifier can have multiple categories in the output. The limit on the number of rows of data is 16,000 (example patterns). The data is saved in a spreadsheet in the form of .CSV (comma separated variables). This is the data that is used to train the network. This data can also be used to examine how well the trained neural network makes predictions.
Step 3 allows you to see a data grid of the file. The following are shown: the path name of the file, whether the initial label row is detected (variable names must start with a letter), the number of columns and data rows read.
Steps 4-5. At this point, you have the option of training the new neural network or using a neural network that has already been trained. You don't have to use all of the data to train the neural network. You can select part of it to train and leave the remainder (usually at the end of the file) for testing the trained neural network.
Step 6. Selection is made of the columns representing the inputs and a single output.
For the Predictor, two types of training strategy are available. The Neural strategy optimizes the number of neurons in the hidden layer. The more neurons, the more precise is the memorization of the training data. Fewer neurons make the network more general. Predictor optimizes or balances the number of neurons in the hidden layer.
The alternative approach is the Genetic approach which combines a genetic algorithm (not to be confused with the GeneHunter program) with a statistical estimator to produce a model that also shows the usefulness of the inputs. This approach trains very slowly. This method also does not allow extrapolation beyond the range of data in the training set. If extrapolation is needed, then the Neural strategy is more appropriate.
It should be pointed out that the genetic method for both the predictor and classifier trains in an out-of-sample mode. That is, it is essentially doing a one-hold-out method that is also referred to as a Jackknife or cross-validation approach. This is important, as it is a superior method of model building over traditional regression analysis.
The Genetic approach trains slowly on large files (more than 3,000 rows of data). Ward Systems suggests taking samples of large databases that include the extremes of the variables of interest.
Graphic displays can be chosen to monitor the actual outputs vs. the network's current predictions, the current level of learning statistics or the relevant importance of the inputs.
For the Classifier, two types of training strategy are available. The Neural strategy allows the complete training of data without "over fitting" of the data.
Two graphic displays are available involving: (1) the Learning level, or (2) Importance of inputs, that is, contributions of the inputs (for the Genetic training strategy only). Categories are also listed with their category size.
Steps 7-8. Here, learning takes place. The graphic displays can be changed anytime during or after learning. On any of the graphics, you can click on the right mouse button to see options for copying, saving or printing of graphics.
Step 9. Learning takes place as long as the green light is on. The red light indicates that the training is complete. The back button can be used to review or change any of the settings.
For the Predictor: Neural training The learning process is monitored indicating the number of hidden neurons trained and the optimal number of hidden neurons selected for this network. The best net statistics are shown which includes R-squared value, average error, correlation, mean squared error (MSE), root mean squared error (RMSE), and the percentage (%) of the data within a chosen range (see Figure 1). When the Genetic training is chosen, any one of these can be chosen as the optimization goal. Importance of the inputs is shown.
Figure 1: Predictor results.
For the Classifier: Statistics involves the total correct and incorrect classifications of the data. Also, the percent correct for each category is listed.
A learning graph based on the number of generations and correct classifications is presented. The user can also choose a graph representing the importance of inputs.
Step 10. In this window, you will see the network output as compared to the observed output in the data file both numerically and graphically.
For the Predictor: Graphics indicating the actual vs. predicted outputs by rows, as shown in Figure 1, are presented, or the actual vs. predicted results can be viewed in a scatter plot.
For the Classifier: Rows classified correctly and those classified incorrectly are listed. The actual and classified outputs are also listed with misclassifications indicated by an asterisk (*). Three types of statistics are available including an agreement matrix with true-positive, false-positive, true-negative, false-negative ratios, sensitivity and specificity (see Figure 2). Graphics showing probabilities and a ROC curve also are available for the categories.
Figure 2: Classifier results.
Step 11. If there are rows that were not previously selected and therefore retained for testing later, they (or any row) can be tested at this point by highlighting those rows. Then the Back button is pressed to apply the network to the newly selected rows.
Step 12. The network can now be saved by pressing the Save Net button.
Step 13. You can decide to retrain the network with another type of net or different input/output columns by pushing the Retrain Net button, which goes back to the appropriate Instructor screen.
Step 14. The network can be tested on another file of data.
Steps 15-16. At this point you can train an entirely new network with a new data file.
NeuroShell Run-Time Server
The run-time server allows several options for firing neural networks created with NeuroShell Predictor or Classifier. The opportunities include running the neural networks from a simple interface, computer programs that have been developed, or Excel spreadsheets. With these procedures you can use neural network models that have been developed on new data without using the NeuroShell Predictor or Classifier interfaces.
I am most interested in options that allow distribution without payment of royalties. The two options that allow this are NSRUN.XLA and NSRUN.DLL. NSRUN.XLA is a Neural Shell Run Excel Add-In that can be sent to people who do not own either the Predictor or Classifier software. The software that you distribute to users would include NSRUN.XLA, which the user loads as an Excel Add-In. The user places a call of the function in each cell that displays results of the network. NSRUN.DLL returns neural network outputs in programs that you have developed.
The third analytical component of the AI Trilogy package is GeneHunter, a genetic algorithm that includes an Excel Add-In for Excel Release 7, Excel 97 or Excel 2000. It includes a dynamic link library of genetic algorithm functions that may be called from programming languages such as Microsoft Visual Basic or C.
Optimization with a genetic algorithm is based on the survival of the fittest. The problem is usually to find the values of input variables that will optimize the output. There are many mathematical methods that work well to optimize "well behaved" problems. However, there are problems that are not so well behaved where these methods break down. The genetic algorithm deals with a population of solutions to a problem. Genetic algorithms offer many solutions and therefore can search multiple solution points simultaneously and come to a solution without getting stuck in a local minimum or on a local maximum of a complex problem.
Figure 3: GeneHunter results.
AI Trilogy includes a GeneHunter tutorial with several Excel applications of genetic algorithms including a portfolio optimization, building a simple neural network, New York Stock Exchange prediction, solving the Traveling Salesman problem and making optimum schedules. Figure 3 shows an Excel spreadsheet in which a neural network for control of acidity is optimized. Other Visual Basic applications are included as genetic algorithm examples.
A Comment on Teaching
For teaching purposes, I have used a Ward Systems package called NeuroShell 2 that contains 16 different types of neural networks. NeuroShell 2 has flexibility for changing the architecture and attributes of the neural networks. Neuroshell Predictor and Classifier are included in the class, as a supplement, for the demonstration of powerful, but simplified, neural networks. Also, GeneHunter is used in the class for demonstration of genetic algorithm applications.
AI Trilogy is a user-friendly collection of artificial neural networks, a genetic algorithm and a run-time server. Companies that we have worked with have found the programs to be a friendly introduction to AI technology. AI Trilogy is an excellent package for those who are interested in getting the results of neural networks without worrying about how the neural network works or having to make adjustments to them. It should be recognized a program's ease of use, made possible by its proprietary algorithms, might result in some loss of control over and understanding of the procedures.
If control and understanding of the neural networks is important, then use of a package like NeuroShell 2 is suggested. Also, it should be noted that there is still some "art" in the design of the data for presentation to neural networks. The AI Trilogy reference manual and the examples provided give helpful suggestions and insights on data presentation to neural networks.
W.B. Roush is an associate professor in Animal Nutrition and Management Science at Penn State University. He is also a member of the dual-title degree program in Operations Research.
OR/MS Today copyright © 2001 by the Institute for Operations Research and the Management Sciences. All rights reserved.
Lionheart Publishing, Inc.
506 Roswell Street, Suite 220, Marietta, GA 30060, USA
Phone: 770-431-0867 | Fax: 770-432-6969
Web Site © Copyright 2001 by Lionheart Publishing, Inc. All rights reserved.