On Mon, Mar 26, 2012 at 10:16 PM, xinfan meng <[email protected]> wrote:
> Thanks. But for one-vs-one, *[-0.63212056, -0.98168436, -0.3495638 ]* would
> not corresponds to class 0, as return by predict().
>
>
>>> pred = [-0.63212056, -0.98168436, -0.3495638 ]
>>> votes = [0] * 3
>>> k = 0
>>> for i in xrange(3):
... for j in xrange(i + 1, 3):
... if pred[k] > 0:
... votes[j] += 1
... else:
... votes[i] += 1
... k += 1
...
>>> votes
[2, 1, 0]
Q.E.D.
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