langfair.metrics.recommendation.metrics.jaccard.JaccardSimilarity#
- class langfair.metrics.recommendation.metrics.jaccard.JaccardSimilarity#
Bases:
Metric
- __init__()#
This class computes the Jaccard Similarity score.
Methods
__init__
()This class computes the Jaccard Similarity score.
evaluate
(list1, list2)This method computes Jaccard Similarity between two lists.
- evaluate(list1, list2)#
This method computes Jaccard Similarity 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:
Jaccard similarity for the two provided lists of recommendations (float)
- Return type:
float