Distributed Information Systems (CSCI 5533)

Distributed Information Systems
(CSCI 5533)
Presentation ID: 19
Clustering Algorithm
Submitted to: Dr. Liaw, Morris
Submitted by: Kumar, Manoj
Algorithm 5.3 BEA
•
•
•
•
•
•
•
•
Input: AA : attribute affinity matrix
Output: CA : clustered affinity matrix
Begin
{ initialize; AA is an nxn matrix}
CA(*,1)← AA(*,1)
CA(*,2)← AA(*,2)
index ← 3
while index ≤ n do {choose the “best” location for
attribute AAindex }
begin
for i from 1 to index – 1 by 1 do
calculate cont (Ai-1, Aindex, Ai)
end-for
calculate cont (Aindex-1, Aindex, Aindex+1)
loc ← placement given by maximum cont value
For j from index to loc by -1 do
• CA(*,j)← CA(*,j-1)
• end-for
•
•
•
•
CA(*,loc)← AA(*,index)
index ← index + 1
end-while
Order the rows according to the relative ordering
of columns
• end. {BEA}
• AM=
• AM=
•
=
n
n
i 1
j 1
n
n
i 1
j 1
  aff ( A , A )[aff ( A , A
i
j
i
 [aff ( A , A )aff ( A , A
i
n
n
j 1
i 1
j
i
j 1
j 1
   aff ( A , A )aff ( A , A
i
j
i
)  aff ( Ai , A j 1 )]
)  aff ( Ai , Aj )aff ( Ai , Aj 1 )]
n
j 1
)   aff ( Ai , Aj )aff ( Ai , Aj 1 )
i 1

• bond(Ax,Ay) =
• AM=
n
[bond ( A , A
j 1
j
j 1
n
 aff ( A , A
z 1
z
x
) aff ( Az , Ay )
)  bond ( A j , A j 1 )]
• A1 A2 ……. Ai-1 Ai Aj
•
AM’
Aj+1…….. An
AM’’
• AMold = AM’ + AM’’ + bond(Ai-1,Ai) +
bond(Ai,Aj) +bond(Aj,Ai) +
bond(Aj,Aj+1)
• = 
• + 
• + 2bond(Ai,Aj)
n
l 1
[bond ( Al , Al 1 )  bond ( Al , Al 1 )]
n
[bond ( Al , Al 1 )  bond ( Al , Al 1 )]
l i  2
• AMnew = AM’ + AM’’ + bond(Ai,Ak) +
bond(Ak,Ai) + bond(Ak,Aj)
•
+ bond(Aj,Ak)
• AMnew = AM’ + AM’’ + 2bond(Ai,Ak) +
2bond(Ak,Aj)
• Cont(Ai,Ak,Aj) = AMnew – Amold
•
= 2bond(Ai,Ak) + 2bond(Ak,Aj)
- 2bond(Ai,Aj)
• Questions ??