[svm e1071] How to avoid the warning reaching max number of iterations

I tried to fit a support vector classifier using svm() on the training data. And type is the target and all other variables can be used as predictors. However, there's a warning led the result may not be reliable. Then I tried fitting my model with only some hand-selected predictors but the result might be wrong.


In short you're getting this problem because the solver is likely getting to a maximum number of iterations without having the ability to find the best or better result. This may or may not be true (as there is not necessarily better results out there).

What happens when you change scale = TRUE? I can think that is partially one of the problems here as I can't think all your features are of the same scale of measurement.

In addition to this, I suggest trying some of the points mentioned in this answer here: https://stats.stackexchange.com/questions/37669/libsvm-reaching-max-number-of-iterations-warning-and-cross-validation

Thank you for your help. I tried to use scale=TRUE but still not the correct answer. And I can't get the gamma on the result.

It is difficult to troubleshoot like this and it seems we'll have to get more involved. Can you provide some data/reprex? See here: FAQ: How to do a minimal reproducible example ( reprex ) for beginners

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.