A small PR to quiet warnings/errors from xrf.formula about the xgb_control object when passed a prefit_xgb object. Very much appreciating the prefitting option in xrf—allows us tidymodels folks to reuse a lot of machinery for training xgb models.👍
library(xrf)
library(rules)
#> Loading required package: parsnip
data("ames", package = "modeldata")
# prefit an xgb object
xgb_fit <-
xgb_train(
x = ames[,c("Lot_Area", "Year_Built")],
y = ames[["Exter_Cond"]]
)
xrf(
Exter_Cond ~ Lot_Area + Year_Built,
data = ames,
family = "multinomial",
prefit_xgb = xgb_fit
)
#> [edit: truncating output for brevity]
#> Warning in condition_xgb_control(family, xgb_control, data, response_var):
#> Detected 5 classes to set num_class xgb_control parameter
A small PR to quiet warnings/errors from
xrf.formula
about thexgb_control
object when passed aprefit_xgb
object. Very much appreciating the prefitting option in xrf—allows us tidymodels folks to reuse a lot of machinery for training xgb models.👍Created on 2022-06-05 by the reprex package (v2.0.1)