<filename>reddit_analysis/app/util/metrics.py
from sklearn.metrics import accuracy_score, f1_score


# Define metrics
# Here, use F1 Macro to evaluate the model.
def metric(y_true, y_pred):
    acc = accuracy_score(y_true, y_pred)
    f1 = f1_score(y_true, y_pred, average='macro')
    return acc, f1
