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 Apr 24, 2018 · 24 revisions

Kendall tau

Definition #1

Ktdef1

Where:

  • taux is the x-th ranking.
  • tauxi is the rank of element i in ranking x

In this case:

ktrange1

Where:

  • n is the ranking size.
  • ncombs is the number of order-independent combinations.

Definition #2

Ktdef2

Where P is the set of unordered pairs of distinc elemts in tau1 and tau2, and:

Kdef1

Kendall tau weighted

Definition #1

Kwdef1

Where tauxvi is the value of i in ranking x, opposed to its index tauxi.

Thus:

ktrange2

This formulation is invariant when multiplying the ranks for a constant, while it is affected by summing a constant to the ranks.

OBS! This weighting method does not work when there are 0 values in the ranking. Also switching to a max normalization would not fix the issues.

Definition #2

This formulation is invariant when summing the ranks to a constant, while it is affected by multiplying them for a constant. Also, When there are 0 values in the ranks the distance can still be calculated, by switching to a normal Kendall tau when all the values are the same.

Let's define the sum of the absolute value of the pair-wise difference of rank x as:

Dndef

DNdef2

Then, we can use it for normalizing:

Kwdef2

Thus:

ktrange3