Advanced Model SVC [3] -Change the key parameters of SVC.
- Genre Oracle
- Nov 2, 2018
- 1 min read
a. kernel
First, we changed the kernel of SVC. To see if the other function, like ‘poly’, ‘rbf’, ‘sigmoid’ are more suitable for this case than ‘linear’.
The result table.

With “OneVsOneClassifier(SVC(kernel=’linear’))”, we get a better accuracy score.
The different from SVC(kernel=’linear’) and LinearSVC:
LinearSVC() is based on liblinear, while SVC(kernel='linear') use libsvm
LinearSVC() minimize hinge loss^2,while SVC(kernel='linear') minimize hinge loss
LinearSVC tends to be faster to converge the larger the number of samples is.
Therefore, after changing the kernel, we now have a better accuracy rate-96%
b. penalty parameter C
Second, we change the Penalty parameter C of the error term.
The generalization ability will be better with a small C, oppositely, the model will be more precise with a big C.
With the default parameter C=1, we get the 96% accuracy rate. We choose C=[0.1,0.4,0.7,1.0,1.5,2,5,10] to see the result.

We could find that when C=2, the accuracy score has been converged to 96.37%
So our final accuracy score is about 96.37% with ‘OneVsOneClassifier(SVC(kernel='linear',C=2))” , added by 4 additional features.
The confusion matrix is :

Comments