Skip to content

Commit

Permalink
minor edit in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
A. Zolanvari authored and A. Zolanvari committed Sep 17, 2024
1 parent bfe5990 commit 5d234c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Test/error_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
>>> cm.combine(1)
Traceback (most recent call last):
...
pycm.pycm_error.pycmMatrixError: Input must be a dictionary containing pycm.ConfusionMatrix objects.
pycm.pycm_error.pycmMatrixError: Input must be an instance of pycm.ConfusionMatrix.
>>> cm = ConfusionMatrix([1, 0, 2, 0], [1, 1, 2, 1])
>>> cm.brier_score()
Traceback (most recent call last):
Expand Down
4 changes: 2 additions & 2 deletions pycm/pycm_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
VECTOR_INDEX_ERROR = "Index is out of range for the given vector."
INVALID_CLASS_NAME_ERROR = "The specified class name is not among the confusion matrix's classes."

COMPARE_TYPE_ERROR = "Input must be an instance of pycm.ConfusionMatrix."
COMPARE_TYPE_ERROR = "Input must be a dictionary containing pycm.ConfusionMatrix objects."
COMPARE_DOMAIN_ERROR = "All ConfusionMatrix objects must have the same domain (same sample size and number of classes)."
COMPARE_NUMBER_ERROR = "At least 2 confusion matrices are required for comparison."

Expand All @@ -92,7 +92,7 @@

COMPARE_METRICS_OFF_ERROR = "Comparison cannot be performed when `metrics_off=True` in any matrix."

COMBINE_TYPE_ERROR = "Input must be a dictionary containing pycm.ConfusionMatrix objects."
COMBINE_TYPE_ERROR = "Input must be an instance of pycm.ConfusionMatrix."

COMPARE_RESULT_WARNING = "Confusion matrices are too similar to identify a clear best option."

Expand Down

0 comments on commit 5d234c7

Please sign in to comment.