#| child: aaa.Rmd
#| include: false

r descr_models("multinom_reg", "spark")

Tuning Parameters

#| label: spark-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("penalty", "mixture"),
                 default = c("0.0", "0.0"))

param <-
  multinom_reg() |> 
  set_engine("spark") |> 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

#| label: spark-param-list
#| echo: false
#| results: asis
param$item

For penalty, the amount of regularization includes both the L1 penalty (i.e., lasso) and the L2 penalty (i.e., ridge or weight decay). As for mixture:

Translation from parsnip to the original package

#| label: spark-csl
multinom_reg(penalty = double(1), mixture = double(1)) |> 
  set_engine("spark") |> 
  translate()

Preprocessing requirements

#| child: template-makes-dummies.Rmd
#| child: template-same-scale.Rmd

By default, ml_multinom_regression() uses the argument standardization = TRUE to center and scale the data.

Case weights

#| child: template-uses-case-weights.Rmd

Note that, for spark engines, the case_weight argument value should be a character string to specify the column with the numeric case weights.

Other details

#| child: template-spark-notes.Rmd

References



Try the parsnip package in your browser

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

parsnip documentation built on June 8, 2025, 12:10 p.m.