Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch06 svm selectJ #22

Open
yiyunchen opened this issue Dec 11, 2018 · 1 comment
Open

ch06 svm selectJ #22

yiyunchen opened this issue Dec 11, 2018 · 1 comment

Comments

@yiyunchen
Copy link

May I ask about the
"Ek = calcEk(oS, k)"
in the selectJ function,

why not just use the Ek calculated in eCache.

@Irlyue
Copy link

Irlyue commented Jan 10, 2019

I think there's bug in the complete version of SMO implementation. First, I wanna say the code provided by the author really sucks and is definitely not pythonic. For example, we rarely use from numpy import * and np.array is recommended (even by the official document) instead of the matrix structure. I want to point out some of the problems in the svm-complete.py code:

  1. The author uses a matrix of size m by 2 to store a flag bit and the calculated value Ek. However, the calculated value Ek is never used.
  2. Second, I try to run both the simple and complete version of the SMO, but they don't yield the same results. The simple version seems to be correct while the complete version doesn't give the best decision boundary. One may argue that it could be due to the randomness of the algorithm. But I think there's a flaw in the implementation.
  3. After some google search, I find out there's better way to choose alphas, which was proposed in the paper by RE Fan in 2005 and was in fact implemented in official libsvm library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants