svm() — Support Vector Machines

Finds the boundary with the widest gap between classes.

svm(X, y)

Key idea

Definition

the boundary direction
the width of the gap
the class label (+1 or -1)

In plain words

Don't just separate the two groups — leave the biggest possible no-man's-land down the middle.

Where you'd use it

Frequently asked questions

What does an SVM do?
Finds the widest-margin boundary between classes; the kernel lets that boundary bend.
Why tune C and gamma?
They trade margin width against fitting the training points — cross-validate to choose.