![]() |
Q13 bizarre results
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 |
Re: Q14 bizarre results
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. |
Re: Q14 bizarre results
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) |
Re: Q14 bizarre results
Thanks for the suggestions!
|
All times are GMT -7. The time now is 12:59 PM. |
Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.