ecemumutlu commited on
Commit
f24157e
·
1 Parent(s): aee6c99

Fix accuracy metric in sentiment anlaysis

Browse files
src/deepeval/sentiment_analysis_task.py CHANGED
@@ -18,7 +18,7 @@ class SentimentAnalysisTask(BaseTask):
18
  messages = prompt
19
  answer = self.generate_response_mcqa(messages, choices=["positive", "negative", "neutral"])
20
  responses.append(answer)
21
- if row["sentiment"] == "positive":
22
  true += 1
23
 
24
  print(responses)
 
18
  messages = prompt
19
  answer = self.generate_response_mcqa(messages, choices=["positive", "negative", "neutral"])
20
  responses.append(answer)
21
+ if row["sentiment"] == answer:
22
  true += 1
23
 
24
  print(responses)