Skip to content

Add support for kernlab linear SVM models#252

Merged
EmilHvitfeldt merged 3 commits into
mainfrom
add-kernlab-svm-linear
Jul 22, 2026
Merged

Add support for kernlab linear SVM models#252
EmilHvitfeldt merged 3 commits into
mainfrom
add-kernlab-svm-linear

Conversation

@EmilHvitfeldt

Copy link
Copy Markdown
Member

Adds tidypredict support for kernlab::ksvm() models fit with the linear (vanilladot) kernel, including svm_linear() parsnip models using the "kernlab" engine, for regression and binary classification. With a linear kernel the decision function collapses to a weighted sum of the predictors, so both modes reuse the existing linear-model formula builder after undoing kernlab's internal scaling; binary classification folds kernlab's Platt-scaling probability into the glm logit path and predicts the second factor level to match the existing glm/LiblineaR convention.

Non-linear kernels and multiclass classification are not supported, and classification requires a probability model (prob.model = TRUE), since one-vs-one voting can't be expressed as a single linear formula. (#232)

@EmilHvitfeldt
EmilHvitfeldt merged commit 18b7337 into main Jul 22, 2026
9 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