Content
    Distant Functions

Distance Functions and Metrics

Distant Functions

A distant function works on two elements (i.e. vectors, sets…).

A given distance function d(s,t)d(s,t) needs to fulfill properties:

  1. d(s,t)0d(s,t) \geq 0 (non-negative)
  2. d(s,s)=0d(s,s) = 0 (distance to itself is zero)
  3. d(s,t)=d(t,s)d(s,t) = d(t,s) (symmetric)
  4. d(s,t)+d(t,r)d(s,r)d(s,t) + d(t,r) \geq d(s,r) (triangle inequality)

Metric

A metric requires an additional property in addition to the four properties of a distant function:

  • d(x,y)=0d(x, y) = 0 if and only if x=yx = y (coincidence axiom)

Two given elements with no distance to each other must be the same element

Jaccard Similarity

Sim(A,B)=ABABSim(A,B) = \frac{|A \cap B|}{|A \cup B|}

Jaccard Distance

d(A,B)=1ABABd(A,B) = 1 - \frac{|A \cap B|}{|A \cup B|}



  • Category

  • Mathematics

  • Tags

  • Data Minig

  • Created

  • 26. September 2015


  • Modified

  • 17. March 2022