Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Distances

Gabriele Girelli edited this page May 16, 2018 · 24 revisions

A ranking definition

Let tau be the ranking of N weighted elements:

$$ \tau = \left{ (l_i, w_i) \mid i \in [1;N] \wedge w_i \ge w_{i-1} \wedge l_i \ne l_j \forall i, j \in [1; N] \right} $$

  • $$l_i$$ is the label of the $$i$$-th item in tau
  • $$w_i$$ is the weighte of the $$i$$-th item in tau
  • $$i \in [1;N]$$ indicates that tau has N elements
  • $$w_i \ge w_{i-1}$$ indicates that the rank is based on the elements weight, and ties are allowed
  • $$l_i \ne l_j \forall i, j \in [1; N]$$ indicates that each label $$l$$ can be present only once in tau

Then:

  • Let $$I(l, \tau)$$ be the index of label $$l$$ in tau, such that $$I(l_i, \tau) = i$$.
    Thus $$\tau=\left{(l_i, w_i)\right}=\left{(l_i, w_{I(l_i, \tau)})\right}$$.
  • Let $$L(\tau)$$ denote the set of labels in tau: $$L(\tau)=\left{l_i \mid i \in [1;N]\right}$$,
    and $$L_i(\tau)$$ denote the $$i-th$$ label in rank tau.
  • Let $$W(\tau)$$ denote the set of weights in tau: $$L(\tau)=\left{w_i \mid i \in [1;N]\right}$$,
    and $$W_i(\tau)$$ denote the $$i$$-th weight in rank tau.

Kendall tau (K)

...

Kendall tau weighted (Kw)

...

Earth Mover's Distance (EMD)

...