Choose the Widest Boundary

Separation with breathing room

A support vector machine (SVM) classifier seeks a boundary that separates classes with the widest possible margin, the gap between the boundary and nearest training points. Those closest influential points are support vectors; they anchor the boundary while many distant points do not affect it directly.

+ + +      |margin|      - - -
+ +   support + | boundary | - support   -
+ + +      |margin|      - - -

A wide margin can generalize better than any arbitrary separating line. The C hyperparameter controls the penalty for classification mistakes: large C prioritizes fitting training examples with a narrower margin, while small C accepts more violations for a wider, more regularized boundary.

from sklearn.svm import SVC
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
model = make_pipeline(StandardScaler(), SVC(C=1.0, kernel='linear'))
Analogy: Draw a safety corridor between two crowds. Many lines separate them, but the center of the widest empty corridor leaves the most room for small future movements.
Warning: One mislabeled point near the boundary can become a support vector and influence the separator strongly, so investigate influential edge cases rather than tuning around bad labels.