# Load libraries
library(parsnip)
# Create model and fit
earth_fit <- mars(mode = "regression") %>%
set_engine("earth") %>%
fit(Volume ~ ., data = trees)
out <- butcher(earth_fit, verbose = TRUE)
# Another earth model object
suppressWarnings(suppressMessages(library(earth)))
earth_mod <- earth(Volume ~ ., data = trees)
out <- butcher(earth_mod, verbose = TRUE)
Run the code above in your browser using DataLab