Skip to content

Conversation

topepo
Copy link
Member

@topepo topepo commented Jul 15, 2025

Related to tidymodels/tune#1039

Linear SVMs have no kernel parameters but loudly complain that none were specified. Adding kpar = list() appears to shush it.

Before

library(parsnip)
library(modeldata)
#> 
#> Attaching package: 'modeldata'
#> The following object is masked from 'package:datasets':
#> 
#>     penguins

res <- 
  svm_linear(mode = "classification", engine = "kernlab") |> 
  fit(Class ~ ., data = two_class_dat)
#>  Setting default kernel parameters

Created on 2025-07-15 with reprex v2.1.1

After

library(parsnip)
library(modeldata)
#> 
#> Attaching package: 'modeldata'
#> The following object is masked from 'package:datasets':
#> 
#>     penguins

res <- 
  svm_linear(mode = "classification", engine = "kernlab") |> 
  fit(Class ~ ., data = two_class_dat)

Created on 2025-07-15 with reprex v2.1.1

@topepo topepo merged commit fbcd3eb into main Jul 15, 2025
13 checks passed
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant