   # Neural Network Tutorial

Neural network technology mimics the brain's own problem solving process. Just as humans apply knowledge gained from past experience to new problems or situations, a neural network takes previously solved examples to build a system of "neurons" that makes new decisions, classifications, and forecasts.

To train the network you must have a data set containing sample facts or parameters with the corresponding answers or results. The data set used for training can be obtained using historical problem data in which the outcomes are known, or by creating sample problems and solutions with the help of experts. Once the training process is completed, the neural network should be able to classify or predict from new inputs. Ward Systems Group provides free technical support including assistance with how to build your particular neural network application.

## Neural Network Example - Sales Forecasting

Neural networks deal with data in a rows and columns format. For example, suppose you have a restaurant, and you are interested in predicting the restaurant's monthly sales. The following is an example of how to use a neural network to make such sales forecasts.

First, lay out in a tabular format in a word processor or spreadsheet the historical data you need, such as the season, number of special events scheduled in the town, the number of ads you have placed, and the cost of those ads. These are the input variables which is what the neural network will use to make predictions about total sales.  Each month's data should be included in a row in the table. The input variables that affect your forecast of monthly sales are columns in the table. You can use any variables that you think affect sales.  One column, usually the last one, is designated as the output that you are trying to predict. Our neural networks "learn" to recognize patterns from historical data (previous examples) presented as above. You will need more than just a few historical examples - as a minimum, you will need 10 to 30 times as many examples as you have input variables.  After this learning, the neural networks are ready to make new predictions for you. The neural networks build an internal formula that takes the input variables and computes the total sales forecast.  For new predictions, all you have to do is show the neural network the new input variables.  It will show you the new neural network prediction for total sales.  It's that easy!

## Neural Network Technical Description for the Mathematically Minded

Neural networks are basically very complex non-linear modeling equations. The parameters of the equations are optimized with an optimization method. Different neural networks have different modeling equations, and different optimization methods. Optimization methods range from simple methods like gradient descent to more powerful ones like genetic algorithms.

If you are familiar with modeling using regression analysis, then you already know how to use neural networks, because the concepts are the same. In regression analysis, you have independent variables; in neural networks we just call them "inputs". In regression analysis you have dependent variables; in neural networks we call them "outputs". In regression you have observations; for neural nets we just call them "patterns". The patterns are the samples from which the neural network builds the model. In regression analysis, the optimization method finds coefficients. In neural networks, we call the coefficients weights, and there are a lot more of them. Neural network "training" results in mathematical equations (models) just like regression analysis does, but the neural network equations are far more complex than the simple "polynomial" equations that regression produces. That is why they are better at recognizing patterns.

Sometimes people who do not understand neural networks will call them "black boxes". By the same token, regression analysis must be a black box to those who don't understand the regression equations. However, if you are mathematical enough to understand the techniques, you can easily see that neural networks are not "black boxes".

## Which Neural Network Software is Right for Me?  