You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DavisVaughan and I spent some time with this this morning, and came to the conclusion that erroring in predict(type = "prob") when an outcome level is named "class" is likely the best route here. Erroring in parsnip, before the predictions are generated, means that downstream packages (tune, stacks, possibly elsewhere) need not anticipate this edge case when joining predictions. This also gives us a chance to raise the same (informative) error any time this issue comes up.
This solution doesn't feel very satisfying. Some alternatives:
changing the column name at predict(type = "prob") in this case, e.g. generating .pred_class___
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
predict(type = "prob")
andpredict(type = "class")
result in the same column names if the outcome has a level named"class"
.Created on 2022-05-09 by the reprex package (v2.0.1)
Some packages downstream from parsnip join these two tibbles together, resulting in issues like tidymodels/stacks#125 and tidymodels/tune#487.
@DavisVaughan and I spent some time with this this morning, and came to the conclusion that erroring in
predict(type = "prob")
when an outcome level is named"class"
is likely the best route here. Erroring in parsnip, before the predictions are generated, means that downstream packages (tune, stacks, possibly elsewhere) need not anticipate this edge case when joining predictions. This also gives us a chance to raise the same (informative) error any time this issue comes up.This solution doesn't feel very satisfying. Some alternatives:
predict(type = "prob")
in this case, e.g. generating.pred_class___
"class"
-like outcome names and levels stacks#126These didn't sound very satisfying either.🤷
The text was updated successfully, but these errors were encountered: