Professional Documents
Culture Documents
ANN3
ANN3
net1=w1'*x1
shown in Fig. 1. x1=[ 1 0 -2 -1]t and x2=[ -1 2 0 -1]t . The w2=w1+0.1*(1- sign(net1))*x1
target for x1 is 1 and for x2 is -1. The initial weight vector w2 = -0.8000
0.3000
Fig. 1 x2=[-1 2 0 -1]';
w1
net2=w2'*x2
w2 net2 = 4.5000
w3=w2+0.1*(-1-sign(net2))*x2
w3 w3 = 0.6000
1.6000
w4 -0.4000
0.5000
Problem: Perceptron Learning Rule
Learning rate = 0.1
w1=[1 -1 0 .5]; x1 w1
Net1=net1=[1 -1 0 .5]*[1 -2 0 -1]'=2.5
x2
w2=w1+.1*(-1-1)*x1 w2
-1
x1
1
3
1
-1 1
x2
1 1
1
-4 -2.5
x3=1
x 1 -x 2 >0
3-x 1 >0
2
x 1 +x 2 -4>0
x 1 -x 2 =0 x 1 +x 2 -4=0
1 2 3
x1
Activation functions of a neuron
Step function Sign function Sigmoid function Linear function
Y Y Y Y
+1 +1 +1 +1
0 X 0 X 0 X 0 X
-1 -1 -1 -1
1, if X 0 1, if X 0 1
Y step Y sign Y sigmoid Y linear X
0, if X 0 1, if X 0 1 e X
2
f ( net ) 1 bipolar continuous
1 e ( net )
1, net 0
f ( net ) sgn( net ) bipolar binary
1, net 0
1
f ( net ) unipolar continuous
1 e ( net )
1, net 0
f ( net ) sgn( net ) unipolar binary
0 , net 0