Compute the precision@N of a list of ranked items.
Declaring type: ItemPredictionEval
Namespace: MyMediaLite.Eval
Assembly: MyMediaLite
Collapse/Expand Syntax
C#
public static double PrecisionAt (
        int[] ranked_items,
        ICollection<int> correct_items,
        ICollection<int> ignore_items,
        int n
) 
Parameters
ranked_items
a list of ranked item IDs, the highest-ranking item first
correct_items
a collection of positive/correct item IDs
ignore_items
a collection of item IDs which should be ignored for the evaluation
n
the cutoff position in the list
Return Value
the precision@N for the given data