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
# In-line function in preprocessor formulaames<-ames %>% select(Sale_Price, Lot_Area, Neighborhood)
lm_wflow<- workflow(log(Sale_Price) ~. , linear_reg())
lm_fit<- fit(lm_wflow, ames)
# Maybe detect when a formula preprocessor is used, look for transformations, # then return just the column name when this happens. lm_fit|>hardhat::extract_mold() |>purrr::pluck("blueprint") %>%
pluck("formula") %>%
rlang::f_lhs() %>%
all.vars()
#> [1] "Sale_Price"
The
extract_*
functions do different things when there is an outcome transformation in a formula:This may be intended/helpful in some cases but definitely not in others. We should perhaps make an option for this.
The text was updated successfully, but these errors were encountered: