-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling single class in chunk for CBPE (#384)
* Fix handling single class in CBPE fitting The `confusion_matrix` function used in various CBPE metrics returns values for each class/label present in the input. For binary classification this means we expect 4 values (TP, FP, FN, TN). However if only one class is represented in the input, the function will only return one value. This commit addresses that failure case by explicitly providing the expected labels to the `confusion_matrix` function. Currently these values are hard-coded for binary classification, but we may want to derive them from the input later on if we were to support string-based pass/fail classes. * Add test case for single class CBPE fitting * Fix F1 sampling error when no positive cases
- Loading branch information
1 parent
13ace29
commit d064916
Showing
3 changed files
with
55 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