from sklearn.metrics import f1_score f1_score(df_test['targetcat'], df_test['prediction'],average='macro')