fit <- fit_predict(
mtcars["wt"], mtcars[["mpg"]],
newdata = data.frame(wt = c(2, 3, 4)),
algorithm = "GLM",
se = TRUE
)
fit[["fitted"]]
fit_predict(
mtcars["wt"], mtcars[["mpg"]],
newdata = data.frame(wt = c(2, 3, 4)),
algorithm = "LINAD",
params = list(max_leaves = 2)
)[["fitted"]]
Run the code above in your browser using DataLab