Finding Probabilistic Nearest Neighbors for Query Objects with Imprecise Locations
1 1 What is Cluster Analysis? l Finding groups of objects such that the objects in a group will be...
-
date post
21-Dec-2015 -
Category
Documents
-
view
213 -
download
0
Transcript of 1 1 What is Cluster Analysis? l Finding groups of objects such that the objects in a group will be...
1 1
What is Cluster Analysis?
Finding groups of objects such that the objects in a group will be similar (or related) to one another and different from (or unrelated to) the objects in other groups
2 2
Applications of Cluster Analysis
Understanding– Group related documents
for browsing, group genes and proteins that have similar functionality, or group stocks with similar price fluctuations
Summarization– Reduce the size of large
data sets
Discovered Clusters Industry Group
1 Applied-Matl-DOWN,Bay-Network-Down,3-COM-DOWN,
Cabletron-Sys-DOWN,CISCO-DOWN,HP-DOWN, DSC-Comm-DOWN,INTEL-DOWN,LSI-Logic-DOWN,
Micron-Tech-DOWN,Texas-Inst-Down,Tellabs-Inc-Down, Natl-Semiconduct-DOWN,Oracl-DOWN,SGI-DOWN,
Sun-DOWN
Technology1-DOWN
2 Apple-Comp-DOWN,Autodesk-DOWN,DEC-DOWN,
ADV-Micro-Device-DOWN,Andrew-Corp-DOWN, Computer-Assoc-DOWN,Circuit-City-DOWN,
Compaq-DOWN, EMC-Corp-DOWN, Gen-Inst-DOWN, Motorola-DOWN,Microsoft-DOWN,Scientific-Atl-DOWN
Technology2-DOWN
3 Fannie-Mae-DOWN,Fed-Home-Loan-DOWN, MBNA-Corp-DOWN,Morgan-Stanley-DOWN
Financial-DOWN
4 Baker-Hughes-UP,Dresser-Inds-UP,Halliburton-HLD-UP,
Louisiana-Land-UP,Phillips-Petro-UP,Unocal-UP, Schlumberger-UP
Oil-UP
Clustering precipitation in Australia
3 3
Notion of a Cluster can be Ambiguous
How many clusters?
Four Clusters Two Clusters
Six Clusters
4 4
Types of Clusterings
A clustering is a set of clusters
Important distinction between hierarchical and partitional sets of clusters
Partitional Clustering– A division of data objects into non-overlapping subsets
(clusters) such that each data object is in exactly one subset
Hierarchical clustering– A set of nested clusters organized as a hierarchical tree
5 5
Partitional vs Hierarchical Clustering
Original Points A Partitional Clustering
p4 p1
p3
p2
p4p1 p2 p3
Hierarchical Clustering Dendrogram
6 6
Other Distinctions Between Sets of Clusters
Exclusive versus Overlapping versus Fuzzy– Exclusive: each object is assigned to only one cluster
– Overlapping: an object may belong to more than one cluster
– Fuzzy: every object belongs to every cluster, with a weight between 0 (absolutely doesn’t belong) and 1 (absolutely belongs)
Partial versus complete– Complete clustering: assigns every object to a cluster
– Partial clustering: does not have to assign every object to some clusters
7 7
K-means Clustering
Partitional clustering approach Each cluster is associated with a centroid (center) Number of clusters, K, must be specified
8 8
Illustrating K-means
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 6
9 9
Illustrating K-means
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 6
10 10
K-means Clustering – Details
Initial centroids are often chosen randomly.– Clusters produced vary from one run to another.
‘Closeness’ is measured by a proximity measure– e.g., Euclidean distance, cosine similarity, or
correlation K-means will converge for common proximity
measures mentioned above.– Most of the convergence happens in the first few
iterations. Complexity is O( n * K * I * d )
– n = number of points, K = number of clusters, I = number of iterations, d = number of attributes
11 11
K-means as Optimization Problem
k-means clustering can be viewed as an iterative approach for minimizing sum of squared error (SSE)
– x: a data point in cluster Ci
– i is the representative point for cluster Ci
For SSE, we can show that i corresponds to center of the cluster
One easy way to reduce SSE is to increase K, the number of clusters
– A good clustering with smaller K can have a lower SSE than a poor clustering with higher K
K
i Cxi
i
xSSE1
2
12 12
Two different K-means Clusterings
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Sub-optimal Clustering
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Optimal Clustering
Original Points
13 13
Importance of Choosing Initial Centroids …
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 5
14 14
Importance of Choosing Initial Centroids …
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
xy
Iteration 5
15 15
10 Clusters Example
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
yIteration 1
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
yIteration 2
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
yIteration 3
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
yIteration 4
Starting with two initial centroids in one cluster of each pair of clusters
16 16
10 Clusters Example
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 1
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 2
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 3
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 4
Starting with two initial centroids in one cluster of each pair of clusters
17 17
10 Clusters Example
Starting with some pairs of clusters having three initial centroids, while other have only one.
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 1
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 2
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 3
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 4
18 18
10 Clusters Example
Starting with some pairs of clusters having three initial centroids, while other have only one.
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
yIteration 1
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 2
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 3
0 5 10 15 20
-6
-4
-2
0
2
4
6
8
x
y
Iteration 4
19 19
Solutions to Initial Centroids Problem
Multiple runs– Helps, but probability might not be on your side
Sample and use hierarchical clustering to determine initial centroids
Select more than k initial centroids and then select among these initial centroids
– Select the most widely separated centroids
Postprocessing
Bisecting K-means
20 20
Empty Clusters
K-means can yield empty clusters
6.5 9 10 15 16 18.5X X X
7.75 12.5 17.25
6.5 9 10 15 16 18.5X X X6.8 13 18
Empty Cluster
21 21
Handling Empty Clusters
Choose a new centroid to replace the empty cluster
Several strategies– Choose the point that contributes most to SSE
this corresponds to the point that is farthest away from any of the current centroids
– Choose a point from the cluster with the highest SSE This will split the cluster and reduces the overall SSE
22 22
Pre-processing and Post-processing
Pre-processing– Normalize the data
– Eliminate outliers
Post-processing– Eliminate small clusters that may represent outliers
– Split ‘loose’ clusters, i.e., clusters with relatively high SSE
– Merge clusters that are ‘close’ and that have relatively low SSE
23 23
Bisecting K-means
Bisecting K-means algorithm– Variant of K-means that can produce a partitional or a hierarchical
clustering
24 24
Bisecting K-means Example
25 25
Limitations of K-means
K-means has problems when clusters are of differing – Sizes
– Densities
– Non-globular shapes
K-means has problems when the data contains outliers.
26 26
Limitations of K-means: Differing Sizes
Original Points K-means (3 Clusters)
27 27
Limitations of K-means: Differing Density
Original Points K-means (3 Clusters)
28 28
Limitations of K-means: Non-globular Shapes
Original Points K-means (2 Clusters)
29 29
Overcoming K-means Limitations
Original Points K-means Clusters
One solution is to use many clusters.Find parts of clusters, but need to put together.
30 30
Overcoming K-means Limitations
Original Points K-means Clusters
31 31
Overcoming K-means Limitations
Original Points K-means Clusters