Wraps a metric to return TRUE/FALSE based on a threshold. Logical, numeric, feedback, and trace-aware metrics all use the package-wide metric protocol; feedback and trace dispatch are preserved by the wrapper.
Value
A metric function returning logical scores. Trace-aware and feedback
protocols are preserved when present on metric.
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