java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.ranking.RankingResult

public class RankingResult extends Object
Result of the RankingMetric.
  • Field Details

    • dcg

      protected double dcg
      Discounted cumulative gain, see Wikipedia.
    • ndcg

      protected double ndcg
      Normalized DCG, see Wikipedia.
    • averagePrecision

      protected double averagePrecision
      Average precision, see Wikipedia.
    • hitsAtK

      protected double hitsAtK
      HITS@K. Using double to allow for averaging HITS@K.
    • precisionAtK

      protected double precisionAtK
      The precision at k, also known as P@K. You can read more on Wikipedia.
    • recallAtK

      protected double recallAtK
      The recall at k, also known as R@K. You can more here.
    • kOfHitsAtK

      protected int kOfHitsAtK
      The K of HITS@K-based KPIs. The hits are saved in hitsAtK and
    • reciprocalRank

      protected double reciprocalRank
      The reciprocal rank, see Wikipedia.
    • rPrecision

      protected double rPrecision
      R-Precision, see Wikipedia.
  • Constructor Details

    • RankingResult

      protected RankingResult()
      Default Constructor
    • RankingResult

      public RankingResult(double dcg, double ndcg, double averagePrecision, double reciprocalRank, double rPrecision, double hitsAtK, double precisionAtK, double recallAtK, int kOfHitsAtK)
      Constructor
      Parameters:
      dcg - Value to be set.
      ndcg - Value to be set.
      averagePrecision - Value to be set.
      reciprocalRank - Value to be set.
      rPrecision - Value to be set.
      hitsAtK - Value to be set.
      precisionAtK - Value to be set.
      recallAtK - Value to be set.
      kOfHitsAtK - Value to be set.
  • Method Details

    • addScores

      void addScores(RankingResult otherResult)
      Adds all scores of otherResult.
      Parameters:
      otherResult - Scores to be added. The otherResult instance will stay untouched.
    • normalizeAllScores

      void normalizeAllScores(double normalizationFactor)
      Normalize everything with a given factor.
      Parameters:
      normalizationFactor - The factor by which all scores shall be normalized, e.g. if normalizationFactor=5.0, then all individual scores (dcg, ndcg, etc.) will be divided by 5.0.
    • getDcg

      public double getDcg()
    • getNdcg

      public double getNdcg()
    • getAveragePrecision

      public double getAveragePrecision()
    • getHitsAtK

      public double getHitsAtK()
    • getkOfHitsAtK

      public int getkOfHitsAtK()
    • getPrecisionAtK

      public double getPrecisionAtK()
    • getReciprocalRank

      public double getReciprocalRank()
      Get the reciprocal rank, see Wikipedia.
      Returns:
      Reciprocal Rank as double.
    • getrPrecision

      public double getrPrecision()
      Get R-Precision, see Wikipedia.
      Returns:
      rPrecision as double.
    • getRecallAtK

      public double getRecallAtK()
    • getF1AtK

      public double getF1AtK()
    • getFmeasureAtK

      public double getFmeasureAtK(double beta)