View source: R/performance_measures.R
F1 | R Documentation |
'F1()' computes the F1 score between the output of a classification prediction model and the actual values of the target.
F1(ct, multi.class = "macro")
ct |
Confusion Matrix. |
multi.class |
Should the results of each class be aggregated, and how? Options: "none", "macro", "micro". (Defaults: "macro"). |
F1 corresponds to the harmonic mean of Precision and Recall.
F1 (a single value).
y <- c(rep("a",3),rep("b",2))
y_pred <- c(rep("a",2),rep("b",3))
ct <- table(y,y_pred)
F1(ct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.