Lecture Notes To Neural Networks in Electrical Engineering
Lecture Notes To Neural Networks in Electrical Engineering
if net > 0
f (net) =
0
otherwise
A1
-
-
-
1
Ai
An
-
Aj 1
Maxnet Algorithm
Step 1: Set activations and weights,
aj (0) is the starting input value to node Aj
1
for i = j
ij =
ij
-
Step 2: If more than one node has nonzero output, do step 3 to 5.
Step 3: Update the activation (output) at each node for
j = 1, 2, 3., n
aj (t+1) = f [ aj (t) ai (t)]
ij
net
f (net) =
a1
if net > 0
otherwise
- 0.25
- 0.25
a2
- 0.25
a3
Solution:
First iteration:
Second iteration:
a1 (2) = f [0 - 0.25(0.05+0.8)] = 0
a2 (2) = f [0.05 - 0.25(0 +0.8)] = 0
a3 (2) = f [0.8 -0.25(0+0.05)] =0.7875
W0
W2
Xi-4
W2
W1
W3
Xi+4
W1
Si
W3
Activation function
net
net > 0
(net) =
0
otherwise
K= i +R
Xi = [Si + Wk Xk (t -1) ]
K= i - R
R2
Wk:
Weights of Xi neighbors
Wk is positive if 0 < k R1
Wk is negative if R1 < k R2
Wk is zero if k > R2
X:
Vector of activations
X_old:
External signal
ALGORITHM
Step 1: Set values of R1, R2 and t_max (No. of iterations).
Initialize weights:
Wk = C1 for k = 0, 1, 2, R1, where C1 is random > 0.
Wk = C2 for k = R1+1,R1+2,.,R2 (C2 is random > 0).
Step 2: (t = 0)
Present the external signal vector S: X=S
The net is initially activated by the input signal vector [0.0 0.4
0.7 1.0 0.7 0.4 0.0]. The activation function of the neuron is:
0
if x < 0
if 0 x 2
(x)=
Solution:
Step 1:
Let R1=1, R2=2, C1=.7, and C2= -0.3 (initialization).
Step 2:
(t = 0)
, since a +D = n
b1
X1
Y1
net 1
Class 1
Maxnet
X2
X3
Y2 net2
X4
Class 2
b2
1
Wij = ei(j)/2
Where ei(j) is the i'th component of the j'th exemplar vector.
Terminology
M:
N:
Step 2:
( i = 1,2,n, j = 1,2,m )
Step 3:
exemplar.
Example: Given the exemplar vector e(1)=(-1 1 1 -1) and
e(2)=(1 -1 1 -1). Use Hamming net to find the exemplar vector
close to bipolar input patterns
(1 1 -1 -1), (1 -1 -1 -1), (-1 -1 -1 1) and (-1 -1 1 1).
b1
2
X1
Y1
net 1
Class 1
Maxnet
X2
X3
Y2 net2
Class 2
X4
2
1
b2
Solution:
Step 1:
W
0.5
0.5
0.5 0.5
Step 2:
Hence, the first input patter has the same Hamming distance
HD = 2
Step 3:
Since y2 > y1, then the second input best matches with the
second exemplar e(2).
Step 4: