scikit-learn/scikit-learn — Issue #559: OvR can not handle one class being not present or always
Author: amueller
Created: 2012-01-16 14:10:19+00:00
State: open

Multi label (haven't testet multi class) classification with ovr crashes when one class is always present or absent.
The reason is that the decision function of the "positive" class is taken.
If a class is allways on or off, though, n_classes is 1 for this particular classifier and the decision function is only one row -
the second row would correspond to the "positive" class.

Maybe this case should be handled explicitly. It is not clear to me whether a classifier should be fit at all.