-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
quality_control: refactor confusion matrix initialization
The existing code creates a row and column for each category in the dataset, plus an extra row/column at the end for unmatched annotations. However, it's not immediately clear what order these rows/columns are in, because all access is done indirectly through the `confusion_matrix_labels_rmap` dictionary. IMO, this is an unnecessary level of indirection, which obscures the structure of the matrix. It's easier to just assign rows/columns 0..(N-1) to the categories and N to "unmatched". Do just that. Additionally, factor out the code creating the matrix into a function, because it's used in two places.
- Loading branch information
Showing
1 changed file
with
32 additions
and
46 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