Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the model was trained using integer numbers as labels, and when one of the labels was the 0 value, the class with this labels and all its training documents were ignored. Therefore, if the problem being solved was a binary class classification, the 0 class was never learned and as such the model was trained using only a single class which lead to the ZeroDivisionError. The fix was really straightforward, the issue was cause by the following condition in the SS3.learn() method: if not doc or not cat: return Replacing the ``not cat`` with ``cat is None`` solved the issue. Resolves: #10
- Loading branch information