r descr_models("discrim_flexible", "earth")

Tuning Parameters

defaults <- 
  tibble::tibble(parsnip = c("num_terms", "prod_degree", "prune_method"),
                 default = c("(see below)", "1L", "'backward'"))

param <-
  discrim_flexible() %>% 
  set_engine("earth") %>% 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameter:

param$item

The default value of num_terms depends on the number of columns (p): min(200, max(20, 2 * p)) + 1. Note that num_terms = 1 is an intercept-only model.

Translation from parsnip to the original package

r uses_extension("discrim_flexible", "earth", "classification")

library(discrim)

discrim_flexible(
  num_terms = integer(0),
  prod_degree = integer(0),
  prune_method = character(0)
) %>% 
  translate()

Preprocessing requirements


Case weights


References



Try the parsnip package in your browser

Any scripts or data that you put into this service are public.

parsnip documentation built on Aug. 18, 2023, 1:07 a.m.