#| child: aaa.Rmd #| include: false
r descr_models("mars", "earth")
#| label: earth-param-info #| echo: false defaults <- tibble::tibble(parsnip = c("num_terms", "prod_degree", "prune_method"), default = c("see below", "1L", "'backward'")) param <- mars() |> set_engine("earth") |> make_parameter_list(defaults)
This model has r nrow(param)
tuning parameters:
#| label: earth-param-list #| echo: false #| results: asis param$item
Parsnip changes the default range for num_terms
to c(50, 500)
.
#| label: earth-reg mars(num_terms = integer(1), prod_degree = integer(1), prune_method = character(1)) |> set_engine("earth") |> set_mode("regression") |> translate()
#| label: earth-cls mars(num_terms = integer(1), prod_degree = integer(1), prune_method = character(1)) |> set_engine("earth") |> set_mode("classification") |> translate()
An alternate method for using MARs for categorical outcomes can be found in [discrim_flexible()].
#| child: template-makes-dummies.Rmd
#| child: template-uses-case-weights.Rmd
Note that the earth
package documentation has: "In the current implementation, building models with weights can be slow."
#| child: template-butcher.Rmd
The "Fitting and Predicting with parsnip" article contains examples for mars()
with the "earth"
engine.
Friedman, J. 1991. "Multivariate Adaptive Regression Splines." The Annals of Statistics, vol. 19, no. 1, pp. 1-67.
Milborrow, S. "Notes on the earth package."
Kuhn, M, and K Johnson. 2013. Applied Predictive Modeling. Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.