Inconsistent appearance of distance
metric in threshold_perf()
#149
Labels
bug
an unexpected problem or unintended behavior
tidy-dev-day 🤓
Tidyverse Developer Day rstd.io/tidy-dev-day
Currently, the
distance
metric is appearing inconsistently when usingthreshold_perf()
. The function documentation states that the defaultcalculated metrics are
j_index()
,sens()
,spec()
, and distance.However, when I use the defaults, the distance metric does not appear.
Now let’s say I just want sensitivity and specificity. I provide a custom
metric set that includes only
sens()
andspec()
. Here I have specifiedthat I only want two metrics, but distance does appear, unexpectedly.
Based on the documentation, I would expect
distance
to show up in the firstcase when the defaults are used. The documentation is a little unclear on what the expected behavior should be in the second case. The documentation says:
This makes it sound like distance will always be included if both sensitivity and specificity are included in the custom metric set, even if it wasn’t explicitly asked for. If so, then the second case is performing as expected. However, since we explicitly defined the desired metrics in the second case, I think the expectation would be that those would be the only metrics returned.
Created on 2024-06-24 with reprex v2.1.0
Session info
The text was updated successfully, but these errors were encountered: