powered by
Weighted F1 score, the harmonic mean of precision and recall.
f1_score(actual, predicted, w = NULL, ...)
Observed values (0 or 1).
Predicted values (0 or 1).
Optional case weights.
Further arguments passed to precision and recall.
precision
recall
A numeric vector of length one.
precision, recall.
precision, recall
# NOT RUN { 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) # }
Run the code above in your browser using DataLab