Modify EmotionRecognition evaluation
This commit is contained in:
parent
a7b78f1eaa
commit
99aacdc440
14
main.py
14
main.py
@ -82,20 +82,18 @@ def get_emotion_recognition_scores(df_in, df_expected, df_predition):
|
||||
df_prediction_sentence = df_predition[~text_annotation]
|
||||
|
||||
f1_text_score = f1_score(
|
||||
df_prediction_text.values.flatten(),
|
||||
df_expected_text.values.flatten(),
|
||||
df_prediction_text,
|
||||
df_expected_text,
|
||||
average='macro',
|
||||
zero_division=0.0,
|
||||
labels=[True, False]
|
||||
zero_division=0.0
|
||||
)
|
||||
f1_text_score = f1_text_score * 100
|
||||
|
||||
f1_sentence_score = f1_score(
|
||||
df_expected_sentence.values.flatten(),
|
||||
df_prediction_sentence.values.flatten(),
|
||||
df_expected_sentence,
|
||||
df_prediction_sentence,
|
||||
average='macro',
|
||||
zero_division=0.0,
|
||||
labels=[True, False]
|
||||
zero_division=0.0
|
||||
)
|
||||
f1_sentence_score = f1_sentence_score * 100
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user