Classifier architecture and Features.1
To talk about ``close'' and ``far'' in a consistent
manner, we need to have the concept of a distance
A distance metric, is a function or algorithm
for calculating a distance between two things, and .
It has three properties:
Anything that obeys these three properties is a distance
Common examples are Euclidean distance in two
- It is always positive or zero.
- The distance from a thing2 to itself is zero.
- It obeys the triangle inequality:
For any three points, , , and ,
for any possible choice of .
In other words, the straight line between
and , which has a length ,
is shorter3 than any other path between
and , such as a path that goes by
way of .
and city block metric [#!cityblock!#]:
(The Euclidean and city-block metrics generalize to any
number of dimensions in a straightforward manner.)