-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(supervision/labeler): raise error if gold contains ABSTAIN
If a user calls get_gold_labels before loading gold labels, they will get a label matrix with all values being -1 (ABSTAIN) L_gold_train = labeler.get_gold_labels(train_cands, annotator='gold') print(L_gold_train[0].reshape(-1)) [-1. -1. -1. ... -1. -1. -1.] Without any indicator that that is incorrect, if they do an LFAnalysis they will have 0 empirical accuracy. To be more friendly to the user, we throw an error to indicate that this is an error. Closes #403.
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
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