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

r descr_models("multinom_reg", "keras")

Tuning Parameters

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

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

This model has one tuning parameter:

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

For penalty, the amount of regularization is only L2 penalty (i.e., ridge or weight decay).

Translation from parsnip to the original package

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

[keras_mlp()] is a parsnip wrapper around keras code for neural networks. This model fits a linear regression as a network with a single hidden unit.

Preprocessing requirements

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

Case weights

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

Saving fitted model objects

#| child: template-bundle.Rmd

Examples

The "Fitting and Predicting with parsnip" article contains examples for multinom_reg() with the "keras" engine.

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.