-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix zero division error (classifying 'empty' docs)
When a document that produced as a classification result all-zero vectors, a ZeroDivision error was thrown. On the Live Test this error produced an infinity loop freezing the browser's Live Test tab, this was due to zero division producing NaN instead of throwing an exception which made the while loop condition never false (e.g. writing "=" as an input document with a model with more than 2 categories will freeze the Live Test tab).
- Loading branch information
1 parent
7afadce
commit bc5c4ed
Showing
3 changed files
with
10 additions
and
6 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
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
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