Skip to content

Commit e316d57

Browse files
authored
Fix error bucket docs to correctly reflect indexes (#1520)
1 parent 9286b75 commit e316d57

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

snorkel/analysis/error_analysis.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ def get_label_buckets(*y: np.ndarray) -> Dict[Tuple[int, ...], np.ndarray]:
3030
>>> buckets = get_label_buckets(Y_gold, Y_pred)
3131
3232
The returned ``buckets[(i, j)]`` is a NumPy array of data point indices with
33-
predicted label i and true label j.
33+
true label i and predicted label j.
34+
35+
More generally, the returned indices within each bucket refer to the order of the
36+
labels that were passed in as function arguments.
3437
3538
>>> buckets[(1, 1)] # true positives
3639
array([0, 1])
37-
>>> (1, 0) in buckets # false negatives
40+
>>> (1, 0) in buckets # false positives
3841
False
39-
>>> (0, 1) in buckets # false positives
42+
>>> (0, 1) in buckets # false negatives
4043
False
4144
>>> (0, 0) in buckets # true negatives
4245
False

0 commit comments

Comments
 (0)