Docsity

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

Partial preview of the text

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

More Clustering

CURE Algorithm

Non-Euclidean Approaches

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

Move points (say) 20% toward the centroid.

age

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.

10

Cosine of Angle Between

Random Vectors

Assume vectors emanate from the origin

Components are random in range

[-1,1].

a

1

a

2

a

n

b

1

b

2

b

n

) has expected value

0 and a standard deviation that grows as

n.

But lengths of both vectors grow as

n.

So dot product around

n/ (

n *

n) = 1/

n.

Random Vectors --- Continued

Thus, a typical pair of vectors has an

angle whose cosine is on the order of1/

n.

As

n ->

, that’s 0; i.e., the angle is

about 90°.

Diagram of Situation

A
C
B

Approximatelyperpendicular

Assuming points lie in a plane: d (
A,
B )

2

d (
B,
C )

2

d (
A,
C )

2

Important Point

Why do we assume AB is perpendicularto AC, and not that either of the othertwo angles are right-angles?

AB and AC are not “random vectors”; theyeach go to points that are far away from Aand close to each other.

If AB is longer than AC, then it is angleACB that is right, but both ACB and ABCare approximately right-angles.

Representing Clusters in Non-

Euclidean Spaces

Recall BFR represents a Euclidean cluster

by

N, SUM, and SUMSQ.

A non-Euclidean cluster is represented by:

N.

The clustroid.

Sum of the squares of the distances fromclustroid to all points in the cluster.

Example of CoD Use

Problem: in non-Euclidean space, we

want to decide whether to merge twoclusters.

Each cluster represented by

N, clustroid,

and “SUMSQ.”

Also, SUMSQ for each point in the cluster,even if it is not the clustroid.

Merge if SUMSQ for new cluster is “low.”

19

Suppose

p

Were the Clustroid

of Combined Cluster

It’s SUMSQ would be the sum of:

Old SUMSQ(

p) [for old cluster containing

p].

SUMSQ(

b) plus

d (

p,

b)

2

times number of

points in

b ’s cluster.

Critical point: vector

p ->

b

assumed

perpendicular to vectors from

b

to all

other points in its cluster --- justifies (2).

Combining Clusters --- Continued

We can thus estimate SUMSQ for each

point in the combined cluster.

Take the

point with the least SUMSQ as theclustroid of the new cluster --- providedthat SUMSQ is small enough.