formulize: Create a formula/recipe interface to a modelling method

Description Usage Arguments Value Examples

Description

Create a formula/recipe interface to a modelling method

Usage

1

Arguments

f

A function with a matrix/vector interface. Assumes data is passed to this function via some combination of arguments x, X, y, Y

Value

The same function, wrapped to have formula/dataframe and recipe/dataframe interfaces.

Examples

1
2
3
4
5
6
library(glmnet)

glmnet_form <- formulize(cv.glmnet)

model <- glmnet_form(mpg ~ drat * hp - 1, mtcars)
predict(model, head(mtcars))

formulize documentation built on May 2, 2019, 6:08 a.m.