Class KendallsTauDyadRankingLoss

  • All Implemented Interfaces:
    DyadRankingLossFunction

    public class KendallsTauDyadRankingLoss
    extends java.lang.Object
    implements DyadRankingLossFunction
    Computes the rank correlation measure known as Kendall's tau coefficient, i.e. (C - D) / (K * (K-1) /2), where C and D are the number of concordant (put in the right order) and discordant (put in the wrong order) pairs of dyads and K is the length of the dyad ranking. Lies between -1 (reversed order) and +1 (same order). Assumes the dyads in the ranking to be pairwise distinct.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double loss​(IDyadRankingInstance actual, IDyadRankingInstance predicted)
      Computes the loss between the actual dyad ordering and predicted dyad ordering, represented by dyad ranking instances.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KendallsTauDyadRankingLoss

        public KendallsTauDyadRankingLoss()
    • Method Detail

      • loss

        public double loss​(IDyadRankingInstance actual,
                           IDyadRankingInstance predicted)
        Description copied from interface: DyadRankingLossFunction
        Computes the loss between the actual dyad ordering and predicted dyad ordering, represented by dyad ranking instances.
        Specified by:
        loss in interface DyadRankingLossFunction
        Parameters:
        actual - the correct ordering
        predicted - the predicted ordering
        Returns:
        the loss between the predicted and correct ordering, depending on the implementation