08.03.2014 Views

Machine Learning 3. Nearest Neighbor and Kernel Methods - ISMLL

Machine Learning 3. Nearest Neighbor and Kernel Methods - ISMLL

Machine Learning 3. Nearest Neighbor and Kernel Methods - ISMLL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Machine</strong> <strong>Learning</strong> / 1. Distance Measures<br />

Distance measures<br />

Let d be a distance measure (also called metric) on a set X ,<br />

i.e.,<br />

d : X × X → R + 0<br />

with<br />

1. d is positiv definite: d(x, y) ≥ 0 <strong>and</strong> d(x, y) = 0 ⇔ x = y<br />

2. d is symmetric: d(x, y) = d(y, x)<br />

<strong>3.</strong> d is subadditive: d(x, z) ≤ d(x, y) + d(y, z)<br />

(triangle inequality)<br />

(for all x, y, z ∈ X .)<br />

Example: Euclidean metric on X := R n :<br />

n∑<br />

d(x, y) := ( (x i − y i ) 2 ) 2<br />

1<br />

i=1<br />

Lars Schmidt-Thieme, Information Systems <strong>and</strong> <strong>Machine</strong> <strong>Learning</strong> Lab (<strong>ISMLL</strong>), Institute BW/WI & Institute for Computer Science, University of Hildesheim<br />

Course on <strong>Machine</strong> <strong>Learning</strong>, winter term 2007 3/48<br />

<strong>Machine</strong> <strong>Learning</strong> / 1. Distance Measures<br />

Minkowski Metric / L p metric<br />

Minkowski Metric / L p metric on X := R n :<br />

n∑<br />

d(x, y) := ( |x i − y i | p ) p<br />

1<br />

with p ∈ R, p ≥ 1.<br />

i=1<br />

p = 1 (taxicab distance; Manhattan distance):<br />

n∑<br />

d(x, y) := |x i − y i |<br />

p = 2 (euclidean distance):<br />

d(x, y) := (<br />

i=1<br />

n∑<br />

(x i − y i ) 2 ) 2<br />

1<br />

p = ∞ (maximum distance; Chebyshev distance):<br />

d(x, y) :=<br />

i=1<br />

n<br />

max<br />

i=1 |x i − y i |<br />

Lars Schmidt-Thieme, Information Systems <strong>and</strong> <strong>Machine</strong> <strong>Learning</strong> Lab (<strong>ISMLL</strong>), Institute BW/WI & Institute for Computer Science, University of Hildesheim<br />

Course on <strong>Machine</strong> <strong>Learning</strong>, winter term 2007 4/48

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!