



















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















































Distance Measures
Hierarchical Clustering
-Means Algorithms
Given a set of points, with a notion of distance between points, group thepoints into some number of
, so
that members of a cluster are in somesense as close to each other aspossible.
Clustering in two dimensions looks easy.
Clustering small amounts of data looks easy.
And in most cases, looks are
deceiving.
Many applications involve not 2, but 10 or 10,000 dimensions.
High-dimensional spaces look different: almost all pairs of points are at aboutthe same distance.
Assuming random points within a boundingbox, e.g., values between 0 and 1 in eachdimension.
Intuitively: music divides into categories, and customers prefer a few categories.
But what are categories really?
Represent a CD by the customers who bought it.
Similar CD’s have similar sets of customers, and vice-versa.
Think of a space with one dimension for each customer.
Values in a dimension may be 0 or 1 only.
A CD’s point in this space is (
1
2
k
), where
i
= 1 iff the
th
customer bought the CD.
Compare with the “correlated items”matrix: rows = customers; cols. = CD’s.
Objects are sequences of {C,A,T,G}.
Distance between sequences is
, the minimum number of
inserts and deletes needed to turn oneinto the other.
Note there is a “distance,” but no convenient space in which points “live.”
Each clustering problem is based onsome kind of “distance” betweenpoints.
Two major classes of distancemeasure:
Euclidean
Non-Euclidean
is a
if it is a
function from pairs of points to realssuch that:
d(x,y) >
d(x,y) = 0 iff x = y.
d(x,y) = d(y,x).
d(x,y) <
d(x,z) + d(z,y) (
triangle
inequality
).
2
: d(x,y) = square root of the
sum of the squares of the differencesbetween
and
in each dimension.
The most common notion of “distance.”
1
: sum of the differences in
each dimension.
Manhattan distance
= distance if you had
to travel along coordinates only.
∞
: d(x,y) = the maximum of
the differences between
and
in
any dimension.
Note: the maximum is the limit as
goes to ∞
of what you get by taking
the
th
power of the differences,
summing and taking the
th
root.
for sets = 1 minus
ratio of sizes of intersection and union.
= angle between
vectors from the origin to the points inquestion.
= number of inserts and
deletes to change one string intoanother.
d(x,x) = 0 because x
x = x
x.
d(x,y) = d(y,x) because union and intersection are symmetric.
d(x,y) >
0 because |x
y| <
|x
y|.
d(x,y) <
d(x,z) + d(z,y) trickier --- next
slide.
1 - |x
z| + 1 - |y
z| >
1 - |x
y|
|x
z|
|y
z|
|x
y|
Remember: |a
b|/|a
b| = probability
that minhash(a) = minhash(b).
Thus, 1 - |a
b|/|a
b| = probability
that minhash(a)
minhash(b).