| mt_fscore | R Documentation |
Class for the F-beta score of one batch. f = 1 (the default) gives the usual F1 score;
values below 1 weight precision more heavily and values above 1 weight recall more heavily.
It is computed from the confusion-matrix counts,
(1 + f^2) TP / ((1 + f^2) TP + f^2 FN + FP), so it returns 0 when the batch has positives yet the
prediction gets them all wrong (TP = 0, FP + FN > 0) and NA only when the batch has no positive
at all (real or predicted). This is the behaviour needed to score a model in model selection:
penalise an all-wrong model (score 0), do not skip it (NA). It is the metric the adp_recurrent()
error-based and hybrid selectors (slct_error_metrics(), slct_psi_then_error()) use, and it matches
the aggregate f1_aggregate().
mt_fscore(f = 1)
f |
The beta parameter of the F-beta score (a single positive number). |
Metric object
library(daltoolbox)
obj <- mt_fscore(f = 1)
evaluate(obj, c(TRUE, FALSE, TRUE), c(TRUE, TRUE, TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.