# NOT RUN {
# Construct the input function through formula interface
input_fn1 <- input_fn(mpg ~ drat + cyl, mtcars)
# }
# NOT RUN {
# }
# NOT RUN {
# Construct the input function from a data.frame object
input_fn1 <- input_fn(mtcars, response = mpg, features = c(drat, cyl))
# }
# NOT RUN {
# }
# NOT RUN {
# Construct the input function from a list object
input_fn1 <- input_fn(
object = list(
feature1 = list(
list(list(1), list(2), list(3)),
list(list(4), list(5), list(6))),
feature2 = list(
list(list(7), list(8), list(9)),
list(list(10), list(11), list(12))),
response = list(
list(1, 2, 3), list(4, 5, 6))),
features = c("feature1", "feature2"),
response = "response",
batch_size = 10L)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab