2012/5/16 Andreas Mueller <[email protected]>:
> As far as I can see, the OneVsRestClassifier
> decides whether to do multi-class or multi-label by
> looking a the training set. This is exactly what you observe:
> If you only have on label per datapoint in the training set,
> you will only get one label back.
Yep. It looks at the labels; if a list of lists is passed in, it does
multilabel classification, e.g.
y = [["ham", "eggs"], ["spam"]]
means sample 0 has the labels "ham" and "eggs" while sample 1 has only
the label "spam".
> Looking at the OneVsRestClassifier code,
> I'm not sure where this happens. Maybe someone
> who is more familiar with this estimator can comment.
This happens in the LabelBinarizer.
--
Lars Buitinck
Scientific programmer, ILPS
University of Amsterdam
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general