![]() |
#1
|
|||
|
|||
![]()
Hi,
Just wondering if anyone has encountered what I'm seeing, or if (more likely) I'm doing something stupid... I'm using the svm command in the e1071 package in R to implement hard margin SVM. Working on Q14, Ein is often not 0, but most of the time when Ein > 0, I actually get Ein = 100. That is, the data set is linearly separable in the Z space, but for some reason the response values are exactly flipped. This seems bizarre to me, yet I can't figure out why it might be happening. I'm wondering if I'm not correctly implementing the constant "b". I simply added a column of ones to my x matrix and moved forward with svm. Any thoughts would be much appreciated. Thanks, Steph |
#2
|
|||
|
|||
![]() Quote:
b = y_m - Sum over support vectors (alpha_n * y_n * K(x_n,x_m)) where the dummy variable in the sum is n, and m is the index of any support vector. b should be the same no matter which SV you use. |
#3
|
|||
|
|||
![]()
Check this documentation:
http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f804 b is already added by the package. Try an extremely large value for C (I used 1e+10) |
#4
|
|||
|
|||
![]()
Thanks for the suggestions!
|
![]() |
Thread Tools | |
Display Modes | |
|
|