Class NDCGLoss

  • 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 NDCGLoss
    extends ARankingPredictionPerformanceMeasure
    implements org.api4.java.ai.ml.ranking.loss.IRankingPredictionPerformanceMeasure
    The Normalized Discounted Cumulative Gain for ranking.
    • Constructor Summary

      Constructors 
      Constructor Description
      NDCGLoss​(int l)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getL()  
      double loss​(java.util.List<? extends org.api4.java.ai.ml.ranking.IRanking<?>> expected, java.util.List<? extends org.api4.java.ai.ml.ranking.IRanking<?>> actual)  
      double loss​(org.api4.java.ai.ml.ranking.IRanking<?> expected, org.api4.java.ai.ml.ranking.IRanking<?> actual)  
      void setL​(int l)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.api4.java.ai.ml.core.evaluation.supervised.loss.IDeterministicPredictionPerformanceMeasure

        loss, score, score
    • Constructor Detail

      • NDCGLoss

        public NDCGLoss​(int l)
        Parameters:
        l - The position up to which to compute the cumulative gain (zero-indexed, exclusive).
    • Method Detail

      • loss

        public double loss​(java.util.List<? extends org.api4.java.ai.ml.ranking.IRanking<?>> expected,
                           java.util.List<? extends org.api4.java.ai.ml.ranking.IRanking<?>> actual)
        Specified by:
        loss in interface org.api4.java.ai.ml.core.evaluation.supervised.loss.IDeterministicPredictionPerformanceMeasure<org.api4.java.ai.ml.ranking.IRanking<?>,​org.api4.java.ai.ml.ranking.IRanking<?>>
        Overrides:
        loss in class ARankingPredictionPerformanceMeasure
      • getL

        public int getL()
      • setL

        public void setL​(int l)