-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loopify step_classdist() #1183
loopify step_classdist() #1183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Groovy!
@@ -230,34 +230,40 @@ mah_pooled <- function(means, x, cov_mat) { | |||
|
|||
#' @export | |||
bake.step_classdist <- function(object, new_data, ...) { | |||
if (length(object$objects[[1]]$center) == 0) { | |||
col_names <- names(object$objects[[1]][[1]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transitioning to selection by position has me a little 🤨 but this looks safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this wasn't ideal, but it is because the information is in two different places depending on pool
. But it just happens to be that names(object$objects[[1]][[1]])
captures both places 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, the positioning is just "first"
Co-authored-by: Simon P. Couch <[email protected]>
This pull request 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. |
Related to #1156.
This PR does a small refactor to
step_classdist()
to bring them up to the same standard as #1156.