Professional Documents
Culture Documents
Session 3: Clustering Techniques - Partitioning & Hierarchical Methods
Session 3: Clustering Techniques - Partitioning & Hierarchical Methods
Session 3:
Clustering Techniques –
Partitioning & Hierarchical
Methods
Partitioning Algorithms: Basic Concept
Example
10 10
10
9 9
9
8 8
8
7 7
7
6 6
6
5 5
5
4 4
4
Assign 3 Update 3
the
3
each
2 2
2
1
objects
1
0
cluster 1
0
0
0 1 2 3 4 5 6 7 8 9 10 to
0 1 2 3 4 5 6 7 8 9 10 means 0 1 2 3 4 5 6 7 8 9 10
most
similar reassign reassign
center 10 10
K=2 9 9
8 8
Arbitrarily choose 7 7
K object as initial
6 6
5 5
2
the 3
1 cluster 1
0
0 1 2 3 4 5 6 7 8 9 10
means 0
0 1 2 3 4 5 6 7 8 9 10
Comments on the K-Means Method
Dissimilarity calculations
10 10
9 9
8 8
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
The K-Medoids Clustering Method
9 9 9
8 8 8
Arbitrar Assign
7 7 7
6 6 6
5
y 5 each 5
4 choose 4 remaini 4
3
k object 3
ng 3
2
as 2
object 2
initial to
1 1 1
0 0 0
0 1 2 3 4 5 6 7 8 9 10
medoid 0 1 2 3 4 5 6 7 8 9 10
nearest 0 1 2 3 4 5 6 7 8 9 10
K=2 s medoid
s Randomly select a
Total Cost = 26 nonmedoid
object,Oramdom
10 10
Do loop 9
Compute
9
Swapping
8 8
total cost
Until no
7 7
O and 6
of 6
Oramdom
change swapping
5 5
4 4
If quality is 3 3
improved.
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
PAM Clustering: Total swapping cost
TCih=jCjih
10 10
9 9
j
8
t 8
t
7 7
5
j 6
4
i h 4
h
3
2
3
2
i
1 1
0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
9
9
8
h 8
7
7
6
j 6
5
5 i
i 4
h j
4
3
t 3
2
2
1
t
1
0
0
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
10 10 10
9 9 9
8 8 8
7 7 7
6 6 6
5 5 5
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
Dendrogram: Shows How the Clusters are Merged
9 9
9
8 8
8
7 7
7
6 6
6
5 5
5
4 4
4
3 3
3
2 2
2
1 1
1
0 0
0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
Recent Hierarchical Clustering Methods
CF = (5, (16,30),(54,190))
10
9
(3,4)
8
7
(2,6)
6
5
(4,5)
4
3
(4,7)
2
(3,8)
1
0
0 1 2 3 4 5 6 7 8 9 10
CF-Tree in BIRCH
Clustering feature:
summary of the statistics for a given subcluster: the 0-th, 1st and 2nd
moments of the subcluster from the statistical point of view.
Non-leaf node
prev CF1 CF2 CF6 next prev CF1 CF2 CF4 next
Clustering Categorical Data: The ROCK
Algorithm
ROCK: RObust Clustering using linKs
S. Guha, R. Rastogi & K. Shim, ICDE’99
Major ideas
Use links to measure similarity/proximity
Not distance-based
Computational complexity:O ( n 2
nm m
m a n 2
log n)
Algorithm: sampling-based clustering
Draw random sample
Cluster with links
Label data in disk
Experiments
Congressional voting, mushroom data
Similarity Measure in ROCK
Traditional measures for categorical data may not work well, e.g.,
Jaccard coefficient
Example: Two groups (clusters) of transactions
C1. <a, b, c, d, e>: {a, b, c}, {a, b, d}, {a, b, e}, {a, c, d}, {a, c, e}, {a, d, e},
{b, c, d}, {b, c, e}, {b, d, e}, {c, d, e}
C2. <a, b, f, g>: {a, b, f}, {a, b, g}, {a, f, g}, {b, f, g} T1 T2
Sim(T1 , T2 )
Jaccard co-efficient may lead to wrong clustering result T1 T2
C1: 0.2 ({a, b, c}, {b, d, e}} to 0.5 ({a, b, c}, {a, b, d})
C1 & C2: could be as high as 0.5 ({a, b, c}, {a, b, f})
Construct
Sparse Graph Partition the Graph
Data Set
Merge Partition
Final Clusters