MyMediaLite
3.11
|
Precision and recall at different positions in the list More...
Static Public Member Functions | |
static double | AP (IList< int > ranked_items, ICollection< int > correct_items) |
Compute the average precision (AP) of a list of ranked items More... | |
static int | HitsAt (IList< int > ranked_items, ICollection< int > correct_items, int n) |
Compute the number of hits until position N of a list of ranked items More... | |
static Dictionary< int, double > | PrecisionAt (IList< int > ranked_items, ICollection< int > correct_items, IList< int > ns) |
Compute the precision at N of a list of ranked items at several N More... | |
static double | PrecisionAt (IList< int > ranked_items, ICollection< int > correct_items, int n) |
Compute the precision at N of a list of ranked items More... | |
static Dictionary< int, double > | RecallAt (IList< int > ranked_items, ICollection< int > correct_items, IList< int > ns) |
Compute the recall at N of a list of ranked items at several N More... | |
static double | RecallAt (IList< int > ranked_items, ICollection< int > correct_items, int n) |
Compute the recall at N of a list of ranked items More... | |
Precision and recall at different positions in the list
Precision and recall are classical evaluation measures from information retrieval.
This class contains methods for computing precision and recall up to different positions in the recommendation list, and the average precision (AP).
The mean of the AP over different users is called mean average precision (MAP)
|
inlinestatic |
Compute the average precision (AP) of a list of ranked items
See p. 147 of Introduction to Information Retrieval by Manning, Raghavan, Schütze.
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
|
inlinestatic |
Compute the number of hits until position N of a list of ranked items
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
n | the cutoff position in the list |
|
inlinestatic |
Compute the precision at N of a list of ranked items at several N
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
ns | the cutoff positions in the list |
|
inlinestatic |
Compute the precision at N of a list of ranked items
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
n | the cutoff position in the list |
|
inlinestatic |
Compute the recall at N of a list of ranked items at several N
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
ns | the cutoff positions in the list |
|
inlinestatic |
Compute the recall at N of a list of ranked items
ranked_items | a list of ranked item IDs, the highest-ranking item first |
correct_items | a collection of positive/correct item IDs |
n | the cutoff position in the list |