You are on page 1of 4

Neural Network tool box operation in MATLAB

Neural Network is an Artificial Intelligence based modeling technique used for handling large
amount of Noisy Data set. The technique mimics the computational ability of brain, acquired by
the change of connection strength in a Network of neurons. The model is used for predicting
the function or process, using the finite number of instances of the process working.
The prerequisite of neural network modeling is a Data Set. A data set is a collection of instances
of the function or process with different inputs. A data set may have one or more inputs and
one or more outputs.

A data set consists of two matrices: INPUT, OUTPUT
For example:
INPUT
Input1 Input2 Input3 Input4
82 96 275 121
60 94 267 125
52 82 262 122
80 96 272 126
77 86 277 121
84 88 265 116
86 75 268 120
82 92 280 127
Process
INPUTS
OUTPUTS
71 89 280 141
78 94 271 118
72 90 266 101
78 120 328 161
80 93 278 127
85 95 276 130
75 92 270 122
56 89 268 124
86 79 272 134
55 77 256 119
89 74 261 123
80 95 281 130
75 122 316 150
50 76 254 118
90 81 262 157
69 113 291 140
79 90 264 128
67 88 285 137
87 87 260 93
67 110 285 136
OUTPUT
output1 output2 output3
36 107 37
33 96 40
32 92 40
35 113 35
28 94 49
35 104 32
25 86 39
36 106 37
30 103 49
39 115 36
29 96 44
41 127 45
33 108 39
37 105 38
34 109 33
34 108 42
28 106 45
30 94 37
26 93 38
39 107 41
38 115 40
30 89 36
26 80 38
37 102 33
38 125 34
31 108 51
23 71 32
29 103 31
Each row of INPUT produces the output in the corresponding row of OUTPUT matrix.
[82 96 275 121]

[36 107 37]


However, in practice we seldom go beyond two outputs, which mean that instead of making a
single neural network for the process we will make three models for modeling each output
separately.
The data is then divided into three subsets.
1) Training Set: it is a set which is used to train the neural network.
2) Validation set: it is used to validate the direction of training. To some extent it is
analogous to class tests, which serves the purpose of accessing the progress of the
teaching in the class.
3) Test Set: It consist of data that is used to evaluate the affectivity of the neural network
in predicting the process. It is analogous to end semester exams, which are the final
measure of the performance of the learning in class.
The point to be noted is that all these set are mutually exclusive. Various ratios are used to
divide the total data set into these subsets.
A commonly used ratio of Training: validation: testing is 70:15:15.
The BLACK BOX approach
The black box approach means to access the model only from its input/output attributes,
without going into the detail of its working. This approach is followed in the following
tutorial of neural network. However, it is strongly advised that reader refer to the literature
for further insight into the subject.



STEPS:
1) Go to START tab at the left bottom of the screen.
START>>Toolboxes>>more>>Neural network>>neural fitting tool (nftool)
2) A window will be giving a brief introduction to the toolbox.
Click on next
3) SELECT DATA window will be opened. As mentioned earlier, the input data matrix and
output data matrix must be made prior to operating the toolbox.
From the drop down menu option in Input: select the input matrix from workspace.
Similarly, select output matrix from the workspace.
Also select ROW option in Samples are Oriented as field just below the output option.
Click next.
4) A training and validation window will appear. Enter the ratio of the Training, validation,
and testing data according to the need. Click on next
5) Hidden Neuron Window will appear with 20 as default number of hidden neurons. Enter
the desired number of hidden neuron for your model. It is, however, advised that begin
with a small number say 5 and then gradually proceed further.
Click on NEXT and the model will be created.
6) Now, train the model by pressing the train Tab, as many times till one get the required
level of mean squared error and regression value.
7) A new window will open (nntrain window). Click on the performance Tab to see the
number of iterations the model has undergone.
Click on next in the main nftool window if you are satisfied with the results or you may
click back tab to change the parameters like number of neurons of data distribution.
8) After you have your final result, click on next till save window appears.
Now, save all the elements of the object in the .MAT file format and click on finish tab.

The above steps only illustrate the basic working of the neural network tool. For further
knowledge please refer to the MATLAB help. There are lot of demos and notes to help you get
grasp of the concept.

You might also like