Skip to content

Commit 3849a27

Browse files
author
Matt Sokoloff
committed
update docstring
1 parent c9d8e4b commit 3849a27

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

labelbox/data/annotation_types/metrics/confusion_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ConfusionMatrixMetric(BaseMetric):
2323
In the editor, this provides precision, recall, and f-scores.
2424
This should be used over multiple scalar metrics so that aggregations are accurate.
2525
26-
value should be a tuple representing:
26+
Value should be a tuple representing:
2727
[True Positive Count, False Positive Count, True Negative Count, False Negative Count]
2828
2929
aggregation cannot be adjusted for confusion matrix metrics.

labelbox/data/metrics/confusion_matrix/calculation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ def classification_confusion_matrix(
8181
) -> ConfusionMatrixMetricValue:
8282
"""
8383
Computes iou score for all features with the same feature schema id.
84+
Because these predictions and ground truths are already sorted by schema id,
85+
there can only be one of each (or zero if the classification was not predicted or labeled).
8486
8587
Args:
8688
ground_truths: List of ground truth classification annotations

labelbox/data/metrics/confusion_matrix/confusion_matrix.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def confusion_matrix_metric(ground_truths: List[Union[
2020
iou=0.5) -> List[ConfusionMatrixMetric]:
2121
"""
2222
Computes confusion matrix metrics between two sets of annotations.
23-
This will most commonly be used for data row level metrics.
23+
These annotations should relate to the same data (image/video).
2424
On the front end these will be displayed as precision, recall, and f1 scores.
2525
2626
Args:
@@ -53,6 +53,7 @@ def feature_confusion_matrix_metric(
5353
) -> List[ConfusionMatrixMetric]:
5454
"""
5555
Computes the confusion matrix metrics for each type of class in the list of annotations.
56+
These annotations should relate to the same data (image/video).
5657
On the front end these will be displayed as precision, recall, and f1 scores.
5758
5859
Args:

0 commit comments

Comments
 (0)