2011/12/5 Ian Goodfellow <[email protected]>:
>
> ok, I was using LinearSVC, so I guess I am still not using the dense
> implementation.
>
> Is there a way to use one-against-rest rather than one-against-many
> classification with the SVC class?

What is one-against-many? SVC mutliclass support comes directly from
the underlying C++ implementation from libsvm which is
one-against-one.

> This page makes it sound like the
> primary difference between SVC and LinearSVC is that SVC uses
> one-against-one while LinearSVC uses one-against-rest:
> http://scikit-learn.sourceforge.net/dev/modules/svm.html

The main difference is the implementation: SVC is based on libsvm and
LinearSVC is based on liblinear.

- libsvm uses SMO (a dual solver) and supports non-linear kernels and
has complexity ~ n_samples^3 hence cannot scale to large n_samples
(e.g. more than 50k).
- liblinear uses some kind of fancy coordinate descent (primal or dual
solvers) optimized for regularized linear models, provides more
regularization / loss function options such as l1 penalty and can
scale to large n_samples (as long as the sparse internal
representation of the data fits in memory).

> By the way, I suggest someone update the documentation to specify what
> the consequences of using the different SVM classes are. Currently
> LinearSVC is recommend "for huge datasets", not "for huge sparse
> datasets." That is on
> this page:
> http://scikit-learn.sourceforge.net/dev/modules/generated/sklearn.svm.LinearSVC.html

For huge dense data, the only viable option is SGDClassifier on memory
mapped arrays (double precision).

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to