forked from scikit-learn/scikit-learn
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: SVC fit() w/ class w/ all 0 sample weights.
Versions of LibSVM and LibLinear that support sample/instance weights will remove all samples with 0 weight before training. If all samples of some classes have 0 weight, the internal LibXXX model will think it has that many less classes than the number provided to sklearn. This caused issues with, for example, predict_proba returning probabilities with the wrong shape in the last dimension.
- Loading branch information
Showing
1 changed file
with
27 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters