scikit-learn/scikit-learn — Issue #552: dual_coef_ and coef_ in SVC deserve some more explanations
Author: mblondel
Created: 2012-01-12 14:09:52+00:00
State: open

Even though, `SVC` uses one-vs-one training internally, the shape of `dual_coef_` is `[n_classes-1, nSV]` and not `[n_classes * (n_classes - 1) / 2, nSV]` as one may expect. It would be nice if someone (@fabianp? @amueller?) competent on the subject could add some more explanations.

If I understood correctly, this representation allows to factorize the alphas with respect to a given support vector and thus precompute a few summations at training time (instead of doing the entire voting at predict time).

I don't understand why it's `n_classes-1` and not `n_classes`.

This FAQ may help too.
http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f402