What's the difference between LibSVM and LibLinear

ukessi picture ukessi · Jul 16, 2012 · Viewed 14.1k times · Source

libsvm and liblinear are both software libraries that implement Support Vector Machines. What's the difference? And how do the differences make liblinear faster than libsvm?

Answer

ogrisel picture ogrisel · Jul 17, 2012

In practice the complexity of the SMO algorithm (that works both for kernel and linear SVM) as implemented in libsvm is O(n^2) or O(n^3) whereas liblinear is O(n) but does not support kernel SVMs. n is the number of samples in the training dataset.

Hence for medium to large scale forget about kernels and use liblinear (or maybe have a look at approximate kernel SVM solvers such as LaSVM).

Edit: in practice libsvm becomes painfully slow at 10k samples.