Closed DavisVaughan closed 5 years ago
I suppose I could have just written a lower level predict function that also has the option to return the outcomes if they are available, and that would pass that on to forge(outcomes = TRUE)
. The top level predict()
would always have that internally set to outcomes = FALSE
So you have the possibility to get a tibble back from this lower level predict function with columns of .pred_0
, .pred_1
, .outcome
so that you dont have to call both predict()
and forge()
in residuals()
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.
After implementing
residuals.logistic_regression
, it looks like I have to call bothpredict()
(which usesforge()
without asking for outcomes) to get the fitted values, andforge(outcomes = TRUE)
separately to preprocess and retrieve the outcomes. Both of these are required to compute residuals, but this ends up preprocessing the predictors twice.With recipes I think this is unavoidable, but I wonder if there is room for another function that only preprocesses outcomes? Then we would remove
outcomes
fromforge()
as an argument.Would this be too much since it would only really help the formula method?