Class KendallsTauDyadRankingLoss

  • All Implemented Interfaces:
    org.api4.java.ai.ml.core.evaluation.supervised.loss.IDeterministicHomogeneousPredictionPerformanceMeasure<org.api4.java.ai.ml.ranking.IRanking<?>>, org.api4.java.ai.ml.core.evaluation.supervised.loss.IDeterministicPredictionPerformanceMeasure<org.api4.java.ai.ml.ranking.IRanking<?>,​org.api4.java.ai.ml.ranking.IRanking<?>>, org.api4.java.ai.ml.ranking.loss.IRankingPredictionPerformanceMeasure

    public class KendallsTauDyadRankingLoss
    extends ARankingPredictionPerformanceMeasure
    implements org.api4.java.ai.ml.ranking.loss.IRankingPredictionPerformanceMeasure
    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.
    • Constructor Detail

      • KendallsTauDyadRankingLoss

        public KendallsTauDyadRankingLoss()
    • Method Detail

      • loss

        public double loss​(org.api4.java.ai.ml.ranking.IRanking<?> expected,
                           org.api4.java.ai.ml.ranking.IRanking<?> predicted)
        Specified by:
        loss in class ARankingPredictionPerformanceMeasure