You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find the return has two params, one is score and the other is scores ,and I found mean(scores) is not equal to score , I want to know what these two return values do, and under what circumstances mean(scores) == score , and the same problem occurred with cider .
def compute_score(self, gts, res):
assert(gts.keys() == res.keys())
imgIds = gts.keys()
scores = []
eval_line = 'EVAL'
self.lock.acquire()
for i in imgIds:
assert(len(res[i]) == 1)
stat = self._stat(res[i][0], gts[i])
eval_line += ' ||| {}'.format(stat)
self.meteor_p.stdin.write('{}\n'.format(eval_line).encode())
self.meteor_p.stdin.flush()
for i in range(0,len(imgIds)):
scores.append(float(self.meteor_p.stdout.readline().strip()))
score = float(self.meteor_p.stdout.readline().strip())
self.lock.release()
return score, scores
(I had the same question not long ago, and as far as I understand:)
At least for BLEU, is usual that mean(scores) != scores in a corpus
Consider the formula for modified precision p_n in the original paper (subsection 2.1.1)
The first sum c in candidates, both in numerator and denominator, adds over all candidates in the corpus
This implies the average of individual sentences and the corpus calculation may differ, for example:
Sentence 1 p_n = A/B and Sentence 2 p_n = C/D
Score in the corpus with both sentences: (A+C) / (B+D)
Mean of individual scores: (A/B + C/D)/2 (not necessarily equal)
This can be spotted in the NLTK code for the corpus_bleu() function; or in this library in the BleuScorer class comparing the comps (individual scores) and totalcomps (corpus score) variables
I find the return has two params, one is score and the other is scores ,and I found mean(scores) is not equal to score , I want to know what these two return values do, and under what circumstances mean(scores) == score , and the same problem occurred with cider .
and the later is my res
We find only cider and rouge is equal .
I hope to get your help, thanks
The text was updated successfully, but these errors were encountered: