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

r descr_models("logistic_reg", "LiblineaR")

Tuning Parameters

#| label: LiblineaR-param-info
#| echo: false
defaults <- 
  tibble::tibble(parsnip = c("penalty", "mixture"),
                 default = c("see below", "0"))

param <-
logistic_reg() |> 
  set_engine("LiblineaR") |> 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

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

For LiblineaR models, the value for mixture can either be 0 (for ridge) or 1 (for lasso) but not other intermediate values. In the [LiblineaR::LiblineaR()] documentation, these correspond to types 0 (L2-regularized) and 6 (L1-regularized).

Be aware that the LiblineaR engine regularizes the intercept. Other regularized regression models do not, which will result in different parameter estimates.

Translation from parsnip to the original package

#| label: LiblineaR-cls
logistic_reg(penalty = double(1), mixture = double(1)) |> 
  set_engine("LiblineaR") |> 
  translate()

Preprocessing requirements

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

Sparse Data

#| child: template-uses-sparse-data.Rmd

Examples

The "Fitting and Predicting with parsnip" article contains examples for logistic_reg() with the "LiblineaR" 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.