SVMs getting stuck

When trying to tune the hyperparameters of SVMs, I noticed that they’re taking exponentially longer than other model types. I’m still trying to lock down the cause for my particular data sets (typically small, around 400 observations). However, I’ve come across three tips that might help others in a similar situation:

  1. Scale features if you aren’t already (Sklearn feature scaler)

  2. Increase cache size (sklearn.svm.SVC) — I’ve had luck using 7GB, but I’m on a machine with 64GB of RAM, so your mileage may vary.

  3. Set a maximum number of iterations. This one means giving up and trying another set of hyperparameters (sklearn.svm.SVC).

Previous
Previous

Drained by writing

Next
Next

Pareto charts: making and interpreting