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

关于svm选择alpha的问题-总是选择相同的那几个 #15

Open
two2er opened this issue Jul 5, 2019 · 1 comment
Open

关于svm选择alpha的问题-总是选择相同的那几个 #15

two2er opened this issue Jul 5, 2019 · 1 comment

Comments

@two2er
Copy link

two2er commented Jul 5, 2019

由于候选alpha列表的顺序是从小到大的,所以如果有某个alpha不满足KKT条件,就会一直更新到它满足为止。我把svm.py每一次迭代更新的i1和i2打印出来,发现在很多情况下,i1和i2在5000次迭代里都是同一个下标,或者同两对下标。也就是说,最后只有一两个样本变成支持向量了。这样的训练结果合理吗?是否要随机打乱候选列表比较好?

@two2er
Copy link
Author

two2er commented Jul 5, 2019

i1, i2 = self._select_two_parameters()
print('update', i1, i2)

打印出每一次迭代选择的i1和i2,会发现几乎总是相同的

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

1 participant