Issue
I was watching a YouTube video to learn about Support Vector Machines (SVM). In the video, he mentions that an SVM finds Support Vector Classifiers (SVC) for dividing the data as one step in their classifying process.
I have used LinearSVC from scikit-learn for classification, but I have a hard time understanding if the implementation of LinearSVC in scikit-learn is an SVM or an SVC, or if the description in the video is incorrect. I find contradicting descriptions on different sites.
- The accepted answer in this question states that LinearSVC is not an SVM, but either it does not say that it is an SVC.
- On the description page of LinearSVC it says "Linear Support Vector Classification", but under "See also" on this page, it says that LinearSVC is "Scalable Linear Support Vector Machine for classification implemented using liblinear".
From what I can understand, LinearSVC and SVC(kernel='linear') are not the same, but that is not the question.
Solution
In terms of Machine Learning concepts LinearSVC
is both because:
SVM
is a model/algorithm used to find a plane that splits the space of samples- this can be applied for both classification (
SVC
) and regression (SVR
) - bothSVC
andSVR
are kinds ofSVM
s
So, an SVC
would be a kind of SVM
and LinearSVC
looks like a specific kind of SVC, although not extending a base SVC
class in scikit-learn
.
If you mean sklearn
source code - the LinearSVC
is in the svm
module... so it's an SVM. It doesn't extend the SVC
or BaseSVC
classes but to me this is an implementation issue/detail and I'd rather think of it as an SVC.
Answered By - stan0
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.