Open liliaevgeniou opened 4 years ago
I'm sorry, I figured out why this didn't work.
MLmetrics assumes "positive" is 0, and "negative" is 1. Hence one must specify that the positives are 1, or otherwise do 1-y_true and 1-y_pred.
MLmetrics::F1_Score(y_true = y_true, y_pred = y_pred, positive = 1)
or
MLmetrics::F1_Score(y_true = 1-y_true, y_pred = 1-y_pred)
Hi, wondering how you calculated F1 score. Wikipedia says:
Here is how I would calculate F1 (using some dummy data), yet I get a different value using the Wikipedia version and MLmetrics version.
Thank you.