What is SVM ?
In a nutshell, SVM is a supervised machine learning model that draws a line that divides data into two. There are priorities at this time.
python
from sklearn.svm import SVC
SVC(C=1.0, kernel='rbf', degree=3, gamma='auto', coef0=0.0, shrinking=True,
probability=False, tol=0.001, cache_size=200, class_weight=None,
verbose=False, max_iter=-1, decision_function_shape=None, random_state=None)
C is a parameter that determines how much misclassification is tolerated. The higher the value of C, the more accurate the classification of the data will be. That is, it tends to be a more complicated line. Note that if you make it too large, you will be in a state of overfitting.
According to the 'Introduction to Machine Learning' from Udacity
kernel There are basically two types to use: Linear, which is a linear kernel, and rbf, which is a non-linear kernel. By the way, Linear separates the data with straight lines, and rbf separates the data with more curved and complex lines.
gamma This determines which point is more important, the point closer to the line or the point farther from the line. That is, the higher the value, the more important the margin with nearby points is, and as a result, the line becomes more complex.
According to the 'Introduction to Machine Learning' from Udacity
On the other hand, if you make it smaller, the margin with a distant point becomes more important, so the line becomes simpler to some extent.
According to the 'Introduction to Machine Learning' from Udacity
--Bad point If the data contains noise (in the figure above, a small number of circles are in the area of circles, or a small number of circles are in the area of circles), and the data is over. If it is wrapped (in the above figure, the line in the middle should be drawn, and many circles and crosses are mixed), it is difficult to classify the data neatly.
The above is the outline of SVM as far as I can understand. We will update it daily, so if you have something to add or fix, we would appreciate it if you could comment.
Recommended Posts