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:
Scale features if you aren’t already (Sklearn feature scaler)
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.
Set a maximum number of iterations. This one means giving up and trying another set of hyperparameters (sklearn.svm.SVC).