-
Notifications
You must be signed in to change notification settings - Fork 2k
SVM with Linear and Polynomial Kernels throw Accord.ConvergenceException #217
Comments
I've same problem. Any ideas? |
Hello, Sorry to ask, but have you tried to reduce the cost of misclassification by reducing the value for the complexity parameter as indicated in the exception? The exception is not exactly a crash, but an indication that some of the parameters might indeed be a bit off. In any case I will setup some more unit tests with the provided data. If you are using Linear kernels, you might also want to try the other learning algorithms, such as LinearDualCoordinateDescent, which might actually be faster and more stable than SMO in this case. Best regards, |
I have specific parameters which I must use and I know that algorithm with that parameters and data should work because I check that in other machine learning tool. Best regards. |
Hi Marcin, Thanks for the answer. Could you please share which other machine learning tool you are referencing to, so I could investigate? Regards, |
I use Weka 3.8. Algorithm: SVM Polynomial Kernel with parameters: C=0.001, exponent 3, constant 1. My data: |
Thanks for the reply. Yes I have tried different complexity values in a grid search (i.e. C logarithmic range {0.0001-1}). Depending on the data set I use the error limit varies and in some cases I get that error throughout the entire range. I was wondering if there is a way to indicate that limit and avoid the exception. Regards, |
Well, given that the SVM has no closed form solution, it is impossible to know whether the learning algorithm with converge or diverge before training starts. Sometimes the complexity constant can be too tight for non-linear separable problems which would certainly lead to a convergence exception. This is by design, and cannot be handled otherwise, unfortunately. |
Hi Cesar, I used the particle swarm optimization algorithm to find the optimal classifier parameters on a particular dataset. There was no problem when Gaussian is used as the kernel function, but the same problem was encountered when using polynomial kernel or linear kernel. Is there a way to skip the exception and continue with parameter optimization? Best regards. |
Library version 3.0.2
I am using SequentialMinimalOptimization for binary classification learning. I tried both Linear and Polynomial Kernels with no success:
For example the SVM with Polynomial Kernel crashes with values:
while the SVM with Linear Kernel crashes with values:
The data I used are from the Data Science London + Scikit-learn in Kaggle. I have attached the 2 files (train.csv and trainLabels.csv) necessary for the training.
Data Science London and Scikit-learn.zip
The following method will prepare the labelled data for training:
The error I get is the following:
I had the impression that error was already addressed in a previous version.
Is there something I am missing (maybe some boundaries i am crossing) or is it a bug?
The text was updated successfully, but these errors were encountered: