You are on page 1of 12

Competitive Learning Neural networks

Hamming Net

S. Vivekanandan

Cabin: TT 319A
E-Mail: svivekanandan@vit.ac.in
Mobile: 8124274447
Hamming Net

• Lippmann introduced in 1987


• Maxnet is used as a subnet to find the unit with the largest net
input.
• Maximum likelihood classifier net that determines which of
several exemplar vectors is most similar to an input vector.
• Weights of the net in this case is determined by the exempler
vectors.

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 2


Hamming Distance

• Hamming distance between two vectors is the number of


components in which the vectors differ.
• Definition – number of differences between two binary or
bipolar vectors (x,y). Denoted as H (x,y).

• Average hamming distance is given as = 1/n H(x,y).

• Where n is the number of components in each vector

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 3


Architecture

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 4


Architecture

• N –input nodes in the lower net with each input node


connected to the M – output nodes.
• These output nodes are connected to a upper net which
calculates the best exemplar match to the input vector.
• Input vector and the exemplar vector are bipolar.
• For a given set of exemplar vector, the Hamming net, finds the
exemplar vector that is closest to the bipolar input vector x.
• The number of components in which the input vector and the
exemplar vector agree is given by net input.

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 5


Algorithm
n = number of input nodes (input vector), m = number of output nodes
(exemplar vector), e(j) = jth exemplar vector
Step 1 : Weights are to be initialized for storing m exemplar vectors
Wij = ei(j)/ 2 ( I = 1…..n, j = 1……m)
Initialize the bias
bj = n/2 ( j =1……..m)
Step 2 : For each vector x, perform steps 3-5
Step 3 : Compute the net input to each unit yj

Yinj  bj  Xiwi
Step 4: Initialize activations for max net
Y j (0) =Y -inj
Step 5: Max net iterates to find the best match exemplar

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 6


Problem

Given the exemplar vectors


e(1) = (-1 1 -1 1 ) e(2) = (1 -1-1-1 ) Use hamming
net to find the exemplar that is closest to each of
the bipolar input patterns
(1 1 -1 -1)
(-1 1 1 -1 )
(-1 -1 -1 1)
(-1-1 1 1 )

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 7


21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 8
21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 9
21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 10
21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 11
• Thus hamming net has been used to find the best exemplar
vector for the given input patterns.

21-03-2017 Dr. S. Vivekanandan Asso. Prof.-SELECT 12

You might also like