r descr_models("svm_linear", "LiblineaR")

Tuning Parameters

defaults <- 
  tibble::tibble(parsnip = c("cost", "margin"),
                 default = c("1.0", "no default"))

param <-
  svm_linear() %>% 
  set_engine("LiblineaR") %>% 
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

param$item

This engine fits models that are L2-regularized for L2-loss. In the [LiblineaR::LiblineaR()] documentation, these are types 1 (classification) and 11 (regression).

Translation from parsnip to the original package (regression)

svm_linear(
  cost = double(1),
  margin = double(1)
) %>%  
  set_engine("LiblineaR") %>% 
  set_mode("regression") %>% 
  translate()

Translation from parsnip to the original package (classification)

svm_linear(
  cost = double(1)
) %>% 
  set_engine("LiblineaR") %>% 
  set_mode("classification") %>% 
  translate()

The margin parameter does not apply to classification models.

Note that the LiblineaR engine does not produce class probabilities. When optimizing the model using the tune package, the default metrics require class probabilities. To use the tune_*() functions, a metric set must be passed as an argument that only contains metrics for hard class predictions (e.g., accuracy).

Preprocessing requirements



Case weights


Examples

The "Fitting and Predicting with parsnip" article contains examples for svm_linear() 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 Aug. 18, 2023, 1:07 a.m.