NNWork

Users Guide



Billy Chan, Ph.D., P.Eng.,
MIL Systems,
1150 Morrison Drive,
Ottawa, Ontario,
Canada K2H 8S9.

bchan@MILSystems.com



Contents
Part I	-	Introduction	1
Part II	-	Walking through NNWork by Example	4
Appendix 1	-	Introduction to Backpropagation Network	11
Appendix 2	-	SAMPLE.DAT	15
Appendix 3	-	SAMPLE.TST	16
Appendix 4	-	SAMPLE.RES	17
Appendix 5	-	Advance NNWork Features	1


Part I
Introduction

	NNWork is an artificial intelligence (AI) system for predicting weld features, 
e.g., heat-affected zone (HAZ) hardness, 800 to 500oC cooling time (T8/5). It is 
implemented by automating one of the artificial neural network (ANN) paradigms, the 
backpropagation network (BPN). BPN is well known for prediction and data mapping; 
see Appendix 1 for the background theory of the BPN technique. The life cycle of a 
practicing backpropagation network involves the preparation of a training data set, the 
actual training of the network and the use of the knowledge obtained from the training 
to perform prediction. NNWork is a MS-DOS based graphics environment which 
incorporates all three stages.

	In general, backpropagation networks can be used to predict input/output data 
relationships. In some way, this is similar to conventional regression analysis. The 
backpropagation network is an alternative technique for analyzing empirical data but it 
requires less training data than conventional regression technology. Furthermore, the 
complexity of the relationship is implicit in the structure of the network, not by a pre-
determined formula relationship which is necessary in regression analyses. Therefore, 
prior insight into the problem and mathematical formulation by the user are not 
necessary. Moreover, the knowledge of the network (analogy to mathematical models 
generated from regression analyses) can be easily extended to cover a larger problem 
domain or even an alternative domain. For example, HAZ hardness knowledge can be 
added to the system as experimental experience (measurements) increases. 
Alternatively, the same system can be used for more than one job shop or 
manufacturing operation where welding is the joining technology if experimental 
information is being gathered.


1.1  Backpropagation Network

	The life cycle of a BPN includes data preparation, network training and result 
predictions. For most practitioners, prediction is the main concern, i.e., given certain 
input conditions what is the output. For example, in designing weld specifications, 
given the input welding conditions (voltage, current, welding speed, etc.) and the steel 
composition, the welding engineer may want to estimate the heat-affected zone (HAZ) 
hardness. It should be noted that, training the network is perhaps the most important 
stage and requires considerable patience and experience. The following is a brief 
description of such a BPN. For details, please refer to Part II, Walking Through 
NNWork by Example.

1.1.1  Data Preparation

	The input to the process of preparing a BPN is similar to that of a regression 
analysis. The practitioner is required to prepare some empirical data which are 
outcomes under specific input conditions, e.g., the empirical data may be HAZ 
hardness values for different cooling times and steel compositions. With this 
information, the objective is to interpolate the relationship for a wide range of 
input/output sets. Usually, the sample data is divided into two sets: a training set and a 
test set. With the training set, the network is conditioned with input/output 
relationships. The test set is used to ascertain the accuracy of the trained network.

	The selection of the training patterns is very important. The data (both input & 
output) in training must cover the entire domain of the problem space since BPN 
responds poorly to extrapolation. With too few training data, the knowledge is 
incomplete and the network may be forced to guess an output without the benefit of 
adequate input experience. On the other hand, the network may be confused if there 
are too many training patterns. The optimum number of training patterns depends on 
the complexity of the relationship. The more complicated the relationship, the more 
training patterns that are required. See Appendix 1 for some guidance in choosing the 
number of training patterns.

	The training patterns should be assembled in a data file format (with *.DAT 
file extension as default), as described in Appendix 2. The network can learn only 
with normalized data, i.e., the data must be prepared to have values between zero and 
one. Therefore, it is necessary to condition the raw data before network training. 
NNWork contains a normalization module for conditioning the input/output data 
according to parameter maximum/minimum values and the corresponding 
normalization range. The conditioned data are then stored in another file (with a 
*.ANN file extension as default) for training.

1.1.2  Network Training

	The normalized data (stored in *.ANN) is then submitted to a training module 
to begin the training process. Before initiating training, the practitioner is required to 
define the BPN structure (number of hidden layers and number of hidden nodes in 
each layer) and the learning properties (learning rate, momentum coefficient, 
dynamics learning, Fahlman derivative, differential step size and error tolerance). The 
knowledge learned from the training is then stored in a weights file (with *.WT1, 
*.WT2 or *.WT file extensions as default). Training is terminated either by the 
practitioner (unsuccessful learning) or when it has reached a pre-defined error 
tolerance (successful learning).

1.1.3  Testing and Prediction

	With the knowledge (weights file) acquired from training, the practitioner is 
ready to use the network to predict unknown outcomes corresponding to input 
conditions from practice. However, it is very important to test the knowledge to verify 
that it is predicting reliable results. Unsatisfactory prediction may occur even with 
knowledge acquired from successful learning. The followings are some possible 
difficulties: 1) the training set may not cover the entire problem domain; 2) conflicts 
may be present in the training set, e.g., experimental error or uncontrolled 
experimental conditions; 3) the error tolerance may be too high; 4) the network 
structure may be too complicated or too simple; or 5) the network may simply get the 
wrong message from the training set. If prediction is unsatisfactory, training must be 
re-done and all possible difficulties examined. On the other hand, if the testing is 
satisfactory, an important relationship has been extracted from the empirical data and 
it is now ready to serve as a practitioner tool.


1.2  Installation & Start Up

The following files are required for NNWork to run:
	-	NNWork.EXE;
	-	NNWork.OVR; and
	-	NORM.HLP, TRAIN.HLP & USE.HLP.
The software also comes with some sample data files:
	-	sample.DAT;
	-	sample.ANN;
	-	sample.WT1;
	-	sample.TST and
	-	sample.RES.

1.2.1  System Requirements

	NNWork requires at least an IBM-PC/AT or compatible (an Intel 486 
processor is highly recommended), with the following equipment as a minimum:
-	1M RAM minimum;
-	MS-DOS or compatible version 3.3 or later; 
-	a high resolution monitor (at least 640X348 active pixels); and
-	a floppy disk drive with 300k free disk space (a hard disk is strongly 
recommended).
Optional equipment includes:
-	a mouse (Microsoft or Logitech compatible); and
-	a dot matrix printer or a HP II LaserJet (PCL compatible).

1.2.2  Installing NNWork

	There is no installation required before starting NNWork. However, 
NNWork.EXE, NNWork.OVR and *.HLP (help files) must be placed on the same 
drive and path.

	To start the training module, please type NNWork at DOS prompt. To start 
the normalization or prediction module, please type  NNWork /norm or NNWork 
/use at DOS prompt respectively. Appropriate mouse driver must be activated 
before starting NNWork.

	For some black and white monitors with lap-top computers, the default screen 
color may be too rich. NNWork can be activated with a black and white option by 
typing NNWork /BW at the DOS prompt.
NNWork - Users Guide





3
Part I Introduction    



