Thanks. But for one-vs-one, *[-0.63212056, -0.98168436, -0.3495638 ]* would
not corresponds to class 0, as return by predict().
On Mon, Mar 26, 2012 at 9:11 PM, Mathieu Blondel <[email protected]>wrote:
>
>
> In [28]: clf.decision_function(X)
>> Out[28]:
>> *array([[-0.63212056, -0.98168436, -0.3495638 ],*
>> * [ 0.63212056, -0. , -0.63212056],*
>> * [ 0.3495638 , 0.98168436, 0.63212056]])*
>>
>
> Because SVC uses one-vs-one, for multiclass classification. The 3 three
> columns you see correspond to:
>
> >>> for i in xrange(3):
> ... for j in xrange(i + 1, 3):
> ... print i, "vs", j
> ...
> 0 vs 1
> 0 vs 2
> 1 vs 2
>
> Cheers,
> Mathieu
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
--
Best Wishes
--------------------------------------------
Meng Xinfan(蒙新泛)
Institute of Computational Linguistics
Department of Computer Science & Technology
School of Electronic Engineering & Computer Science
Peking University
Beijing, 100871
China
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general