ANN - Basics
ANN - Basics
NETWORKS
PERCEPTRON AND OTHER BASIC ELEMENTS
Neural Network
Outer Layer
Hidden Layer
Input Layer
Input Signal
Translation Operation
The mathematical expression that describes the translation of
input stimulus pattern to output response signal is called the
transfer function of the neurode.
f ( I ), if f ( I ) T
yi
0, Otherwise
Input Layer
Input Signal
Neural Network
1. Processing units
2. Weighted interconnections between the various
processing units which determine how the
activation of one unit leads to input for another
unit.
3. An activation rule which acts on the set of input
signals at a unit to produce a new output signal, or
activation.
4. Optionally, a learning rule that specifies how to
adjust the weights for a given input/output pair.
Perceptron
Neurode
w1 w2
Input Input
x1 x2
Perceptron
1, if I T
y
1, if I T
Perceptron
McCulloch and Pitts Neurode model is the basis of NN
Rosenlastt’s perceptron uses the same neurode and proposed a training
law for seperating patterns.
Weight Vectors
Initial W0 = (-
0.6, 0.8)
After A1, W1 = (-0.3,1.5)
After B1, W2 = (0.3, 1.2)
After A2, W3 = (2.0, 1.5)
After B2, W4 = (2.2, 2.3)
Classification using Vector
Training
Characteristics:
Bipolar Output of +1 (say category A ) if weighted input is greater
than 0 &
-1 (say category B ) if weighted input is less than or
equal to 0
n
Input can be calculated as,
I w x
i 1
i i
x x Desired
1 2 Answer
w1 w1
Comparer
Weight
Update
Info
Category (+1 or -
1)
compute the adaline’s net input, I, for this same input vector (to see
if done)
if ( I > 0 ) output +1; else output -1
compute error, E, as above
}/* end while error not equal to zero */
}/* end of all previously trained patterns */
}/* end of original error was not zero */
}/* end of all patterns in training set */
[email protected] © M. Shahbaz – 2016
Adalin
e
If the new pattern cause a weight change
then all the previous patterns should be
checked again for their correct
classification.
Weight Vectors
W0 = (-0.6, 0.8)
Apply B1:
I = 0.36+ 0.24 = 0.60
Since I > 0, therefore output = +1
Error = -1 -1 = -2
Weight needs update
Square of input pattern B1 = 0.36 + 0.09 = 0.45
old Ex
Change in w1 = (0.5)(-2)(-0.6) / (0.45) = 1.3 w w 2
Change in w2 = (0.5)(-2)(0.3) / (0.45) = -0.7 x
[email protected] © M. Shahbaz – 2016
Classification Example using
Adaline
Delta Vector = (1.3, 0.7)
New weight Vector w1 = (0.7, 0.1)
Since weight is changed therefore check all the previous patterns if they are
still correctly classifiable with the new weight vector
Apply Pattern A1
I = 0.21+ 0.07 = 0.28
Since I > 0 therefore output = +1
E=1–1=0
[email protected] © M. Shahbaz – 2016
Delta Rule
A
2
A1
A3
B1
B2
B3
A2
A1
A3
B1
A4
B2 B5
B3
B4
S A
T C
will decide the sign as length of the vector will always be
positive
Cos() = Positive when = 90
[email protected] © M. Shahbaz – 2006
Delta Rule
Dot Product of two vectors will be positive if the angle between them
is less than 90o.
+1
output
-1 output
A2
A1
A3
B1 +1
A4
output
B2 B5
-1 outputB3
B4