With my limited knowledge of SVM, I am following a tutorial on YouTube to create an End-to-End multi-class ML model . There the person is using SVM on a dataset with 9 images dataset, but the dataset I am working on is of around 12,000 images.

I am doing all my work on Google Colab, When I tried to fit my model, it has been processing since then(1h 30 min). That's why I am wondering if SVM will be good for my case or maybe some else model I should try.

Is there a chance this is happening due to the fact that I am using free version for google colab.


2 Answers 2


SVMs are powerful models that work well for small to medium size datasets, but they can be computationally intensive, especially on larger datasets. This is because the complexity of training an SVM typically scales between O(n^2) to O(n^3), where n is the number of samples. In your case, with 12,000 images, it's not surprising that training an SVM is taking a long time.

If possible, try using models such as CNN. CNN can perform well on image data. And you can make use of GPUs with CNN.


Though elegant in theory, support vector machines are quite slow if the number of candidate predictors is above 100. In fact, oftentimes there are computational issues even when the number of candidate predictors is 10+. Never had good experience with SVM.

In your case, every "clever" feature aggregating several/many pixels is a candidate predictor (whether the feature is obtained via wavelet analysis, principal component analysis or somehow differently). Therefore, I would advise you to start with random forests or gradient boosting.

That is the generic approach, of course. An even better procedure would be examining recent research of your specific problem (the type of images that you study). I'm sure shortcuts have been developed and you will proceed accordingly.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.