Docsity

Clustering-Data Mining-Lecture 11 Slides-Computer Science, Slides of Data Mining

Partial preview of the text

Download Clustering-Data Mining-Lecture 11 Slides-Computer Science and more Slides Data Mining in PDF only on Docsity!

More Clustering

CURE Algorithm

Clustering Streams

The CURE Algorithm

Problem with BFR/

k

-means:



Assumes clusters are normally distributedin each dimension.



And axes are fixed --- ellipses at an angleare

not

OK.

CURE:



Assumes a Euclidean distance.



Allows clusters to assume any shape.

Starting CURE

Pick a random sample of points that fitin main memory.

Cluster these points hierarchically ---group nearest points/clusters.

For each cluster, pick a sample ofpoints, as dispersed as possible.

From the sample, pick representativesby moving them (say) 20% towardthe centroid of the cluster.

Example

: Initial Clusters

e

e

e

e

e

e

e

e

e

e

e

h

h

h

h

h

h

h

h

h h

h

h

h

salary

age

Example

: Pick Dispersed Points

e

e

e

e

e

e

e

e

e

e

e

h

h

h

h

h

h

h

h

h h

h

h

h

salary

age

Move points(say) 20%toward thecentroid.

Finishing CURE

Now, visit each point

p

in the data set.

Place it in the “closest cluster.”



Normal definition of “closest”: that clusterwith the closest (to

p

) among all the

sample points of all the clusters.

BDMO Approach

BDMO = Babcock, Datar, Motwani, O’Callaghan.

k

–means based.

Can use less than O(

N

) space for

windows of size

N

Generalizes trick of DGIM: buckets of increasing “weight.”

Recall DGIM

Maintains a sequence of buckets B

1

, B

2

Buckets have timestamps (most recent stream element in bucket).

Sizes of buckets nondecreasing.



In DGIM size = power of 2.

Either 1 or 2 of each size.

Buckets for Clustering

In place of “size” (number of 1’s) we use (an approximation to) the sum ofthe distances from all points to thecentroid of their cluster.

Merge consecutive buckets if the “size” of the merged bucket is less than thesum of the sizes of all later buckets.

Consequence of Merge Rule

In a stable list of buckets, any two consecutive buckets are “bigger” thanall smaller buckets.

Thus, “sizes” grow exponentially.

If there is a limit on total “size,” then the number of buckets is O(log

N

N

= window size.



E.g., all points are in a fixed hypercube.

Organization of Buckets

Each bucket consists of clusters atsome number of levels.



4 levels in our examples.

Clusters represented by:

Location of centroid.

Weight

= number of points in the cluster.

Cost

= upper bound on sum of distances

from member points to centroid.

Processing Buckets --- (1)

Actions determined by

N

(window size)

and

k

(desired number of clusters).

Also uses a tuning parameter

for

which we use 1/4 to simplify.



1/

is the number of levels of clusters.

Level-0 Clusters

A single point

p

is represented by

p

That is:

A point is its own centroid.

The cluster has one point.

The sum of distances to the centroid is 0.

Merging Buckets --- (1)

Needed in two situations:

We have to process a query, whichrequires us to (temporarily) merge sometail of the bucket sequence.

We have just added a new (most recent)bucket and we need to check the ruleabout two consecutive buckets being“bigger” than all that follow.