Skip to content

Commit

Permalink
fix: Ensure STS pearson and spearman does not use the p-value only th…
Browse files Browse the repository at this point in the history
…e correlation (#1207)

Fixes #1206
  • Loading branch information
KennethEnevoldsen authored Sep 9, 2024
1 parent ba562ce commit 5aa401d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mteb/evaluation/evaluators/STSEvaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __call__(
similarity_scores = np.array(_similarity_scores)

if similarity_scores is not None:
pearson = pearsonr(self.gold_scores, similarity_scores)
spearman = spearmanr(self.gold_scores, similarity_scores)
pearson, _ = pearsonr(self.gold_scores, similarity_scores)
spearman, _ = spearmanr(self.gold_scores, similarity_scores)
else:
# if model does not have a similarity function, we assume the cosine similarity
pearson = cosine_pearson
Expand Down

0 comments on commit 5aa401d

Please sign in to comment.