![]() |
#1
|
|||
|
|||
![]()
I thought it would be nice to have a way to check if we're on the right track with problems 2-5 without giving away the answers. I ran SVM (with the polynomial kernel) for a couple of cases and pasted the results below. Are others getting the same numbers?
0 vs 7 classifier, C=0.01, Q=2 number of support vectors = 861 ![]() ![]() 2 vs 8 classifier, C=0.1, Q=3 number of support vectors = 721 ![]() ![]() |
#2
|
|||
|
|||
![]() |
#3
|
|||
|
|||
![]()
I got exactly the same figures as the original poster. I'm using libsvm with the C programming language.
|
#4
|
|||
|
|||
![]() |
#5
|
|||
|
|||
![]()
Thanks Sendai, That was a good idea.
I'm using scikit-learn too, a pretty nice python module. Your results helped me to figure out that I needed to set the parameters gamma and coef0 in sklearn.svm.SVC(...) to 1. These parameters don't appear in the lecture. Now I've got the same results. |
#6
|
|||
|
|||
![]() Quote:
|
#7
|
|||
|
|||
![]()
I get three and five respectively using libsvm via Python and scikit-learn.
|
#8
|
|||
|
|||
![]()
I'm trying libsvm through C, with following parameters:
param.svm_type = C_SVC; param.kernel_type = POLY; param.degree = 2; param.gamma = 1; param.coef0 = 1; param.nu = 0.5; param.cache_size = 200; param.C = 0.01; param.eps = 1e-3; param.p = 0.1; param.shrinking = 1; param.probability = 0; param.nr_weight = 0; param.weight_label = NULL; param.weight = NULL; but getting Ein as 0.350 with 0 versus 7 classification. Also unable to find good explaination of these parameters anywhere. Any help? Thanks in advance. |
#9
|
|||
|
|||
![]()
I found the issue...thanks for reply from buttterscotch. The problem was with the way I was initializing 'svm_node' structure after reading the training data.
|
#10
|
|||
|
|||
![]()
Seems good to me. Are you getting the same number of support vectors with Sendai's post? You might want to verify how you calculate the error. The sv_coefficients are not just "alpha", but "y*alpha"
|
![]() |
Thread Tools | |
Display Modes | |
|
|