Skip to content

Quiet linear svm models #1278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Quiet linear svm models #1278

merged 2 commits into from
Jul 15, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant