Wraps a numeric metric to return TRUE/FALSE based on a threshold.
Examples
# F1 score with threshold
metric <- metric_threshold(metric_f1(), threshold = 0.8)
metric("the quick brown fox", "the fast brown fox") # FALSE (0.75 < 0.8)
#> [1] FALSE
Wraps a numeric metric to return TRUE/FALSE based on a threshold.
# F1 score with threshold
metric <- metric_threshold(metric_f1(), threshold = 0.8)
metric("the quick brown fox", "the fast brown fox") # FALSE (0.75 < 0.8)
#> [1] FALSE