## Selected model frame
sel_mf <- SelectedInput(
sale_amount ~ sale_year + built + style + construction,
sale_amount ~ sale_year + base_size + bedrooms + basement,
data = ICHomes
)
fit(sel_mf, model = GLMModel)
## Selected recipe
library(recipes)
data(Boston, package = "MASS")
rec1 <- recipe(medv ~ crim + zn + indus + chas + nox + rm, data = Boston)
rec2 <- recipe(medv ~ chas + nox + rm + age + dis + rad + tax, data = Boston)
sel_rec <- SelectedInput(rec1, rec2)
fit(sel_rec, model = GLMModel)
Run the code above in your browser using DataLab