Class RankingResult
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_eval.evaluator.metric.ranking.RankingResult
Result of the
RankingMetric
.-
Field Summary
Modifier and TypeFieldDescriptionprotected double
Average precision, see Wikipedia.protected double
Discounted cumulative gain, see Wikipedia.protected double
HITS@K.protected int
The K of HITS@K-based KPIs.protected double
Normalized DCG, see Wikipedia.protected double
The precision at k, also known as P@K.protected double
The recall at k, also known as R@K.protected double
The reciprocal rank, see Wikipedia.protected double
R-Precision, see Wikipedia. -
Constructor Summary
ModifierConstructorDescriptionprotected
Default ConstructorRankingResult
(double dcg, double ndcg, double averagePrecision, double reciprocalRank, double rPrecision, double hitsAtK, double precisionAtK, double recallAtK, int kOfHitsAtK) Constructor -
Method Summary
Modifier and TypeMethodDescription(package private) void
addScores
(RankingResult otherResult) Adds all scores ofotherResult
.double
double
getDcg()
double
getF1AtK()
double
getFmeasureAtK
(double beta) double
int
double
getNdcg()
double
double
double
Get the reciprocal rank, see Wikipedia.double
Get R-Precision, see Wikipedia.(package private) void
normalizeAllScores
(double normalizationFactor) Normalize everything with a given factor.
-
Field Details
-
dcg
protected double dcgDiscounted cumulative gain, see Wikipedia. -
ndcg
protected double ndcgNormalized DCG, see Wikipedia. -
averagePrecision
protected double averagePrecisionAverage precision, see Wikipedia. -
hitsAtK
protected double hitsAtKHITS@K. Using double to allow for averaging HITS@K. -
precisionAtK
protected double precisionAtKThe precision at k, also known as P@K. You can read more on Wikipedia. -
recallAtK
protected double recallAtKThe recall at k, also known as R@K. You can more here. -
kOfHitsAtK
protected int kOfHitsAtKThe K of HITS@K-based KPIs. The hits are saved inhitsAtK
and -
reciprocalRank
protected double reciprocalRankThe reciprocal rank, see Wikipedia. -
rPrecision
protected double rPrecisionR-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
Adds all scores ofotherResult
.- Parameters:
otherResult
- Scores to be added. TheotherResult
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. ifnormalizationFactor=5.0
, then all individual scores (dcg, ndcg, etc.) will be divided by5.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)
-