Hi, I've implemented a soft-margin SVM with kernel function and I referred to yours. I found there's a problem in your code to compute the bias term in the training process in this line.. Your code compute the by using the SVMPredictor which you set bias to 0. In this way, you compute the term AND use a sign function. But in the SVM algorithm, the sign function is not used in computing the bias term.
Yes. We shouldn't use sign function here. That is a major mistake rather than a bug. I highly suggest correcting it as there are already many webpages on svm quoting this repo.
Hi, I've implemented a soft-margin SVM with kernel function and I referred to yours. I found there's a problem in your code to compute the bias term in the training process in this line.. Your code compute the
by using the
SVMPredictor
which you set bias to 0. In this way, you compute the term AND use a sign function. But in the SVM algorithm, the sign function is not used in computing the bias term.