Skip to content

Commit

Permalink
not the right place to implement "other"
Browse files Browse the repository at this point in the history
  • Loading branch information
brimoor authored and imanjra committed Dec 19, 2024
1 parent d725315 commit 585411c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions fiftyone/operators/builtins/panels/model_evaluation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def get_confusion_matrix_colorscale(self, matrix):

def get_confusion_matrices(self, results):
default_classes = results.classes.tolist()
other_label = "(other)"
freq = Counter(results.ytrue)
if results.missing in freq:
freq.pop(results.missing)
Expand All @@ -257,27 +256,32 @@ def get_confusion_matrices(self, results):
mc_classes = sorted(freq, key=freq.get, reverse=True)
lc_classes = sorted(freq, key=freq.get)
default_matrix, _default_classes, _ = results._confusion_matrix(
other_label=other_label,
include_other=False,
include_missing=True,
tabulate_ids=False,
)
az_matrix, _az_classes, _ = results._confusion_matrix(
classes=az_classes,
other_label=other_label,
include_other=False,
include_missing=True,
tabulate_ids=False,
)
za_matrix, _za_classes, _ = results._confusion_matrix(
classes=za_classes,
other_label=other_label,
include_other=False,
include_missing=True,
tabulate_ids=False,
)
mc_matrix, _mc_classes, _ = results._confusion_matrix(
classes=mc_classes,
other_label=other_label,
include_other=False,
include_missing=True,
tabulate_ids=False,
)
lc_matrix, _lc_classes, _ = results._confusion_matrix(
classes=lc_classes,
other_label=other_label,
include_other=False,
include_missing=True,
tabulate_ids=False,
)
default_colorscale = self.get_confusion_matrix_colorscale(
Expand Down

0 comments on commit 585411c

Please sign in to comment.