A support vector machine (SVM) is a supervised machine learning algorithm that finds the hyperplane that best separates data points of one class from those of another class.
A support vector machine (SVM) is a supervised machine learning algorithm that finds the hyperplane that best separates data points of one class from those of another class.
A hyperplane is the decision boundary that separates data points of different classes and can be a line in 2D space or a plane in n-dimensional space.
Support vectors are the data points closest to the separating hyperplane that mark the boundary of the margin and identify the location of the hyperplane.
SVMs use kernel functions to transform data to a higher-dimensional space where classes become easier to separate, commonly known as the kernel trick.
Support vector regression (SVR) adapts SVMs for regression tasks by identifying a hyperplane that best fits the data within a specified margin of tolerance while penalizing errors that fall outside this margin.
SVMs are used in natural language processing for spam detection and sentiment analysis, computer vision for image classification and face detection, signal processing for speech recognition, anomaly detection, and bioinformatics for protein classification.
SVMs effectively handle high-dimensional and unstructured data, are less prone to overfitting due to regularization, provide clear and interpretable decision boundaries for linear classifiers, and are highly accurate for smaller data sets.
SVMs are not suitable for large data sets due to high computational cost and memory requirements, noisy data where maximizing margins is problematic, or when interpretability is critical for nonlinear models.
A hard margin SVM requires perfect separation with no misclassifications for linearly separable data, while a soft margin SVM allows some misclassifications to maximize the margin for nonseparable data.
You can train SVM models using the fitcsvm and fitrsvm functions or interactively through the Classification Learner app and Regression Learner app, which allow you to perform the complete workflow without writing code.
Resources
Expand your knowledge through documentation, examples, videos, and more.