langfair.metrics.recommendation.metrics.prag.PRAG#
- class langfair.metrics.recommendation.metrics.prag.PRAG#
Bases:
Metric
- __init__()#
This class computes Pairwise Ranking Accuracy Gap (PRAG).
Methods
__init__
()This class computes Pairwise Ranking Accuracy Gap (PRAG).
evaluate
(list1, list2)This method computes PRAG score between two lists.
- evaluate(list1, list2)#
This method computes PRAG score between two lists.
- Parameters:
list1 (list of strings) – A list of recommendation from an LLM model.
list2 (list of strings) – Another list of recommendation from an LLM model.
- Returns:
PRAG metric value for the two provided lists of recommendations (float)
- Return type:
float