Sie sind auf Seite 1von 15

Artificial Neural Networks

Classification using MultiLayer Perceptron Model

• It can separate classes that lie either side of a straight line easily.
• But in reality division between classes are much more complex.
• Take for example the classical exclusive-or (XOR) problem.
• XOR logic function has two inputs and one output.

x1 x2 z
x2
(0,1) (1,1)
0 0 0
0 1 1
1 0 1
1 1 0
(0,0) (1,0) x1
XOR Problem

• We consider this as a problem in which we want


the perceptron to learn to solve:
– output 1 if x1 is on and x2 is off, or is x2 is on and x1 is off,
otherwise output a 0.
• This appears a simple problem, but there is no
linear solution, and this problem is linearly
inseparable.
• Hence single-layer perceptrons cannot solve this
problem.
Multilayer Perceptrons
• Multilayer perceptrons have been applied to
solve some difficult problems.
• This consist of input layer, one or more hidden
layer and an output layer.
• The training of the network is done by the
highly popular algorithm known as the error
back- propagation algorithm.
• This algorithm is based on the error-
correcting learning rule.
• Basically there are two passes through the different
layers of the network: forward pass and the
backward pass.
XOR Problem – with two layers
Consider the following neural network with
two inputs, 1 hidden layer and 1 output layer.
b1
+1 +1
w11
x1 Neuron 1
w31 b3
w12
Output
Neuron 3
x1 x2 z
w21
0 0 0
w22 w32
0 1 1
x2 Neuron 2
b2 1 0 1
+1
1 1 0
Input Hidden Output
layer layer layer
APPLICATION

• Verify that the network shown in the previous


slide solves an XOR problem for the following
two sets of parameters. Assume that the
activation function, (v) , in the neurons are
threshold functions, where,
1, if v  0
(v) = 
0, if v  0
– (Cazul 1) w11= w12 = w21 = w22 = w32 = +1, w31 =-2, b1=-1.5 and b2=b3=-0.5
– (Cazul 2) w11= w12 = w21 = w22 = w32 = -1, w31 =1, b1=1.5, b2=0.5 and b3=-0.5
Verificare
pentru Cazul 1
Verificare
pentru Cazul 1
Verificare
pentru Cazul 1
Verificare
pentru Cazul 1
Verificare
pentru Cazul 2
Verificare
pentru Cazul 2
Verificare
pentru Cazul 2
Verificare
pentru Cazul 2
Temă de seminar

Să se calculeze răspunsurile rețelei neuronale (propuse în acest curs) și să se verifice


corectitudinea rezultatelor pentru problema XOR pentru 2 noi cazuri ale valorilor ponderilor
sinaptice ale memoriei și ale valorilor prag (Cazul 3 și Cazul 4).
– (Cazul 3) w11= w12 = w21 = w22 = w32 = -1, w31 =1.1, b1=1.3, b2=0.6 and b3=-0.6
– (Cazul 4) w11= w12 = w21 = w22 = w32 = +1, w31 =-2.1, b1=-1.4 and b2=b3=-0.4

De menționat că modul de calcul și verificarea rezultatelor pentru problema XOR s-a realizat anterior în Cazurile 1 și 2!
– (Cazul 1) w11= w12 = w21 = w22 = w32 = +1, w31 =-2, b1=-1.5 and b2=b3=-0.5
– (Cazul 2) w11= w12 = w21 = w22 = w32 = -1, w31 =1, b1=1.5, b2=0.5 and b3=-0.5
Temă de Laborator

Să se realizeze implementări într-un limbaj de programare care să determine răspunsurile


rețelei neuronale (propuse în acest curs) și verificarea corectitudinii rezultatelor pentru problema
XOR pentru 2 noi cazuri (prezentate la tema de seminar) ale valorilor ponderilor sinaptice ale
memoriei și ale valorilor prag (Cazul 3 și Cazul 4).
– (Cazul 3) w11= w12 = w21 = w22 = w32 = -1, w31 =1.1, b1=1.3, b2=0.6 and b3=-0.6
– (Cazul 4) w11= w12 = w21 = w22 = w32 = +1, w31 =-2.1, b1=-1.4 and b2=b3=-0.4

Das könnte Ihnen auch gefallen