powered by
Create a formula/recipe interface to a modelling method
formulize(f)
A function with a matrix/vector interface. Assumes data is passed to this function via some combination of arguments x, X, y, Y
x
X
y
Y
The same function, wrapped to have formula/dataframe and recipe/dataframe interfaces.
# NOT RUN { library(glmnet) glmnet_form <- formulize(cv.glmnet) model <- glmnet_form(mpg ~ drat * hp - 1, mtcars) predict(model, head(mtcars)) # }
Run the code above in your browser using DataLab