Support Vector Machine Lab
Interactive 2D डेटा पर linear max-margin classification और kernel-based nonlinear separation की तुलना करें।
Linear SVM एक hyperplane f(x)=w^Tx+b सीखता है जो classes को अलग करता है और margin को maximize करता है।
$$\min_{w,b}\ \frac{1}{2}\|w\|^2 + C\sum_i \max(0, 1-y_i(w^Tx_i+b))$$
इस सिमुलेटर में linear model hinge-loss behavior को optimize करने के लिए Pegasos-style stochastic updates उपयोग करता है।
जब डेटा linearly separable नहीं होता, kernel methods points को transformed feature space में compare करते हैं।
RBF को smooth local boundaries के लिए या Polynomial को curved global boundaries के लिए आज़माएं।
Support vectors को highlighted samples के रूप में दिखाया जाता है जो decision surface को define करते हैं।
- lambda: linear Pegasos updates के लिए regularization strength।
- lr: step size जो update speed और stability नियंत्रित करता है।
- gamma (RBF): बड़े मान tight, अधिक local boundaries बनाते हैं।
- degree (Poly): बड़ा degree boundary complexity बढ़ाता है।
- Demo data लोड करें और Linear SVM को कई epochs के लिए ट्रेन करें।
- Margin lines और training accuracy trend देखें।
- Kernel Perceptron पर स्विच करें और nonlinear region behavior तुलना करें।
- Kernel parameters ट्यून करें और support vectors की वृद्धि देखें।
Samples रखने के लिए क्लिक करें। पहले Class A/B चुनें, फिर train करें और boundaries देखें।