
Kernel Methods and Nonlinear Boundaries
A ring of points surrounds a cluster, and no straight line separates them. Kernel methods measure similarity instead of plotting giant coordinates, while gamma and C set the reach of each example and the tolerance for mistakes.
উৎস
সম্পূর্ণ পাঠ সারাংশ
Place a small cluster of points at the center of a blank pair of axes. Around that cluster, arrange another set of points in a ring, the way a bracelet might lie around a coin. No straight line drawn on those original axes can separate the two groups. A line that keeps the center cluster on one side will slice through the ring, leaving some ring points stranded with the center. Tilting the ruler does not help. The two sets are not linearly separable.
Kernel methods change the question. Instead of asking where to draw a line, they ask how similar each point is to every other point. The radial basis function kernel takes two points and returns a number between zero and one that measures their closeness. It uses the formula exp(-gamma times the squared distance between the points). With gamma set to 0.5, two points one unit apart have a similarity of exp(-0.5), roughly 0.61. Two points two units apart have a similarity of exp(-2), roughly 0.14. Similarity fades smoothly as distance grows, but it never reaches zero. The classifier builds a score from these similarity values, weighted by the training examples, and compares that score with a threshold.
Gamma controls how far one example's influence reaches. A small gamma makes similarity fade slowly, so each point's influence stretches far and the boundary stays smooth. A large gamma makes similarity drop sharply, so each point matters mainly to its close neighbors and the boundary can bend tightly around local clusters. In the center-and-ring example, a moderate gamma lets the ring's examples collectively outvote the center's examples at outer locations, while the center cluster wins near the middle.
C is a separate dial. It trades tolerance for training mistakes against simplicity of the boundary. A low C accepts some misclassified training points in exchange for a smoother, more regular surface. A high C pushes toward classifying every training point correctly, which can produce a wiggly boundary that follows individual points. Gamma and C interact, so tuning one while ignoring the other gives a misleading picture. A smooth setting can be made more complex by raising C, and a very large C may stop changing the solution once the influential examples, called support vectors, settle.
Suppose one stray center point sits just inside the ring's band. A high C may bend the boundary to capture that point, while a low C may leave it misclassified. Neither choice is automatically right. The decision depends on whether the stray point reflects the pattern or is noise.
In class, give pairs a printed grid with a center cluster and a ring, plus two colored pencils labeled small gamma and large gamma. Ask them to sketch where each setting would place the boundary and to write one sentence explaining the difference. Collect the sketches and read several aloud. The visible reasoning shows whether students connect gamma to reach and C to tolerance, and where their intuitions need another example.


