Class TRECAveragePrecision<U,I>
java.lang.Object
es.uam.eps.ir.ranksys.metrics.AbstractRecommendationMetric<U,I>
es.uam.eps.ir.relison.links.recommendation.metrics.accuracy.TRECAveragePrecision<U,I>
- Type Parameters:
U
- type of the usersI
- type of the items
- All Implemented Interfaces:
es.uam.eps.ir.ranksys.metrics.RecommendationMetric<U,I>
public class TRECAveragePrecision<U,I>
extends es.uam.eps.ir.ranksys.metrics.AbstractRecommendationMetric<U,I>
Average Precision: average of the precision at each recall level.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TRECAveragePrecision(int cutoff, es.uam.eps.ir.ranksys.metrics.rel.IdealRelevanceModel<U,I> relevanceModel)
Constructor. -
Method Summary
-
Field Details
-
Constructor Details
-
TRECAveragePrecision
public TRECAveragePrecision(int cutoff, es.uam.eps.ir.ranksys.metrics.rel.IdealRelevanceModel<U,I> relevanceModel)Constructor.- Parameters:
cutoff
- cutoff of the metricrelevanceModel
- relevance model
-
-
Method Details
-
evaluate
Returns a score for the recommendation list.- Parameters:
recommendation
- recommendation list- Returns:
- score of the metric to the recommendation
-