F1 Score
Calculates weighted F1 score or F measure defined as the harmonic mean of precision and recall, see https://en.wikipedia.org/wiki/Precision_and_recall for some background. The higher, the better.
f1_score(actual, predicted, w = NULL, ...)
actual |
Observed values (0 or 1). |
predicted |
Predicted values (0 or 1). |
w |
Optional case weights. |
... |
Further arguments passed to |
A numeric vector of length one.
f1_score(c(0, 0, 1, 1), c(0, 0, 1, 1)) f1_score(c(1, 0, 0, 1), c(0, 0, 1, 1)) f1_score(c(1, 0, 0, 1), c(0, 0, 1, 1), w = 1:4)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.