• Distance Measure (𝑑) - is a function that takes two elements in some set (𝑋) and outputs a non-negative real number
    • used to measure the distance between two elements
  • Distance Metric (𝑑) - is a distance measure that satisfies 4 properties
  • Distance Semi-Metric (𝑑) - is a distance measure that satisfies 3 properties

Distance Measure - Categories

Category

Properties

Distance Measure

REQUIRED

NOT-REQUIRED

NOT-REQUIRED

NOT-REQUIRED

Distance Metric

REQUIRED

REQUIRED

REQUIRED

REQUIRED

Distance Semi-Metric

REQUIRED

REQUIRED

REQUIRED

NOT REQUIRED

Distance Measure - Types

Type

Category

Input Type

Description

Norm Distance Metric

METRIC

depends

  • an norm (||·||)induces a distance metric (𝑑||·||) defined as: 𝑑||·||(𝑥,𝑦) = ||𝑥-𝑦||

Rectilinear Distance Metric

METRIC

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝐿1 = ||𝑢̅-𝑣̅||1 = 𝛴1≤𝑖≤𝑛|𝑢̅𝑖-𝑣̅𝑖|

Euclidean Distance Metric

METRIC

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝐿2 = ||𝑢̅-𝑣̅||2 = ||𝑢̅-𝑣̅|| = [ 𝛴1≤𝑖≤𝑛(𝑢̅𝑖-𝑣̅𝑖)2 ](1/2)

Minkowski Distance Metric

METRIC

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝐿𝑝 = ||𝑢̅-𝑣̅||𝑝 = [ 𝛴1≤𝑖≤𝑛|𝑢̅𝑖-𝑣̅𝑖|𝑝 ](1/𝑝)

Tchebychev Distance Metric

METRIC

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝐿 = ||𝑢̅-𝑣̅|| = [ 𝛴1≤𝑖≤𝑛|𝑢̅𝑖-𝑣̅𝑖| ](1/∞) = 𝑚𝑎𝑥(|𝑢̅𝑖-𝑣̅𝑖|)

Squared Euclidean Distance

MEASURE

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝛴1≤𝑖≤𝑛(𝑢̅𝑖-𝑣̅𝑖)2

Cosine Distance Measure

MEASURE

vectors

  • 𝑑(𝑢̅,𝑣̅) = 𝑐𝑜𝑠-𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝑢̅,𝑣̅) = 1 - 𝑐𝑜𝑠-𝑠𝑖𝑚𝑖𝑙𝑎𝑟𝑖𝑦(𝑢̅,𝑣̅) # 𝑐𝑜𝑠-𝑠𝑖𝑚𝑖𝑙𝑎𝑟𝑖𝑡𝑦(𝑢̅,𝑣̅) = [𝑢̅·𝑣̅] / [||𝑢̅||*||𝑣̅||]
  • used for measuring distance when the magnitude of the vectors does not matter

Jaccard Distance Metric

METRIC

sets

  • 𝑑(𝐴,𝐵) = 𝐽𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒(𝐴,𝐵) = 1 - 𝐽𝑠𝑖𝑚𝑖𝑙𝑎𝑟𝑖𝑡𝑦(𝐴,𝐵) # 𝐽(𝐴,𝐵) = |𝐴⋂𝐵| / |𝐴⋃𝐵|

KL-Divergence
Relative Entropy

MEASURE

random variables/vectors

Hamming Distance Metric

METRIC

strings

  • measures the similarity between 2 strings of equal length

Discrete Distance Metric
Discrete Metric

METRIC

anything

Distance Measure - Other