Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between LibSVM and LibLinear

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?

like image 836
ukessi Avatar asked Jul 16 '12 16:07

ukessi


People also ask

What is LIBSVM used for?

Introduction. LIBSVM is an integrated software for support vector classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution estimation (one-class SVM). It supports multi-class classification.

What is LIBLINEAR in Python?

LIBLINEAR is a linear classifier for data with millions of instances and features. It supports. L2-regularized classifiers. L2-loss linear SVM, L1-loss linear SVM, and logistic regression (LR) L1-regularized classifiers (after version 1.4)


1 Answers

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.

like image 86
ogrisel Avatar answered Sep 22 '22 21:09

ogrisel