diff --git a/main.py b/main.py index 519c68e..957decb 100644 --- a/main.py +++ b/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