← Lesson
BitWithBite
AI & Machine Learning · Quick Reference

lesson-3.3 Cheat Sheet

AI & Machine Learning
In one line: SVMs are natively binary classifiers. Scikit-learn's SVC extends to multi-class using one-vs-one: train a separate binary classifier for every pair of classes, then combine thei...

Key Ideas

1Multi-class with SVC. SVMs are natively binary classifiers. Scikit-learn's SVC extends to multi-class using one-vs-one: train a separate binary classifier for every pair of classes, then co...
2SVR — the epsilon-insensitive tube. Instead of fitting a separating boundary, SVR fits a "tube" of width epsilon around the regression line. Points inside the tube incur zero loss; only points outside it...
3Probability calibration. SVMs don't natively output probabilities — the core algorithm just produces a signed distance from the decision boundary (decision_function). To get predict_proba, sci...

Code Examples

from sklearn.svm import SVC, SVR clf = SVC(kernel='rbf', C=1.0, gamma='scale', probability=True) clf.fit(X_train, y_train) clf.predict_proba(X_test) # requires probability=True, adds training cost reg = SVR(kernel='rbf', C=1.0, epsilon=0.1) reg.f...