Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Lecture # 10
Multilayer Percceptron
1
Artificial Neural Networks (ANN)
• Neural computing requires a
number of neurons, to be
connected together into a
neural network.
• A neural network consists of:
– layers
– links between layers
0 0
0 1
1 0
1 1
Example: OR function
-10
20 0 0
20 0 1
1 0
1 1
Negation:
10
-20
0
1
Putting it together:
-30 10 -10
20 -20 20
20 -20 20
-30 -10
0 0
20
10
20
0 1
20
-20
20
1 0
-20 1 1
Example of multilayer Neural
Network
• Suppose input values are 10, 30, 20
• The weighted sum coming into H1
SH1 = (0.2 * 10) + (-0.1 * 30) + (0.4 * 20)
= 2 -3 + 8 = 7.
• The σ function is applied to SH1:
σ(SH1) = 1/(1+e-7) = 1/(1+0.000912) = 0.999
• Similarly, the weighted sum coming into H2:
SH2 = (0.7 * 10) + (-1.2 * 30) + (1.2 * 20)
= 7 - 36 + 24 = -5
• σ applied to SH2:
σ(SH2) = 1/(1+e5) = 1/(1+148.4) = 0.0067
• Now the weighted sum to output unit O1 :
SO1 = (1.1 * 0.999) + (0.1*0.0067) = 1.0996
• The weighted sum to output unit O2:
SO2 = (3.1 * 0.999) + (1.17*0.0067) = 3.1047
• The output sigmoid unit in O1:
σ(SO1) = 1/(1+e-1.0996) = 1/(1+0.333) = 0.750
• The output from the network for O2:
σ(SO2) = 1/(1+e-3.1047) = 1/(1+0.045) = 0.957
• The input triple (10,30,20) would be
categorised with O2, because this has the
larger output.
Training Parametric Model
Minimizing Error
Least Squares Gradient
Single Layer Perceptron
Single layer Perceptrons
Different Response Functions
Learning a Logistic Perceptron
Back Propagation
Back Propagation
A Worked Example:
Hidden Output
η δO hi(E) Δ = η*δO*hi(E) Old weight New weight
unit unit
H1 O1 0.1 0.0469 0.999 0.000469 1.1 1.100469
H1 O2 0.1 -0.0394 0.999 -0.00394 3.1 3.0961
H2 O1 0.1 0.0469 0.0067 0.00314 0.1 0.10314
H2 O2 0.1 -0.0394 0.0067 -0.0000264 1.17 1.16998
XOR Example
Linear separation
Can AND, OR and NOT be represented?
• Is it possible to represent every boolean
function by simply combining these?
0.8
0.6
0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Epoch
13 -1.4018, 1.4177, -1.6290 -1.5219, -1.8368, 1.6367 0.6917, 1.1440, 1.1693
40 -2.2827, 2.5563, -2.5987 -2.3627, -2.6817, 2.6417 1.9870, 2.4841, 2.4580
90 -2.6416, 2.9562, -2.9679 -2.7002, -3.0275, 3.0159 2.7061, 3.1776, 3.1667
190 -2.8594, 3.18739, -3.1921 -2.9080, -3.2403, 3.2356 3.1995, 3.6531, 3.6468
Acknowledgements
Introduction to Machine Learning, Alphaydin
Statistical Pattern Recognition: A Review – A.K Jain et al., PAMI (22) 2000
Material in these slides has been taken from, the following resources
47