Skip to content

Commit

Permalink
Apply changes in the messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alirezazolanvari committed Aug 16, 2024
1 parent 51cc957 commit 9e5fbfc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Test/error_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,19 @@
>>> cp = Compare({"cm1": cm, "cm2": cm3}, by_class=True, class_weight={1: 1, 2: 1})
Traceback (most recent call last):
...
pycm.pycm_obj.pycmCompareError: class_weight must be a dictionary and specified for all classes.
pycm.pycm_obj.pycmCompareError: `class_weight` must be a dictionary and specified for all classes.
>>> cp = Compare({"cm1": cm, "cm2": cm3}, by_class=True, class_weight=[])
Traceback (most recent call last):
...
pycm.pycm_obj.pycmCompareError: class_weight must be a dictionary and specified for all classes.
pycm.pycm_obj.pycmCompareError: `class_weight` must be a dictionary and specified for all classes.
>>> cp = Compare({"cm1": cm, "cm2": cm3}, by_class=True, class_benchmark_weight=[])
Traceback (most recent call last):
...
pycm.pycm_obj.pycmCompareError: class_benchmark_weight must be a dictionary and specified for all class benchmarks.
pycm.pycm_obj.pycmCompareError: `class_benchmark_weight` must be a dictionary and specified for all class benchmarks.
>>> cp = Compare({"cm1": cm, "cm2": cm3}, by_class=True, overall_benchmark_weight=[])
Traceback (most recent call last):
...
pycm.pycm_obj.pycmCompareError: overall_benchmark_weight must be a dictionary and specified for all overall benchmarks.
pycm.pycm_obj.pycmCompareError: `overall_benchmark_weight` must be a dictionary and specified for all overall benchmarks.
>>> cm1 = ConfusionMatrix([1, 1, 1, 0], [1, 0, 1, 1], metrics_off=True)
>>> cm2 = ConfusionMatrix([1, 1, 1, 0], [1, 0, 1, 1], metrics_off=False)
>>> cp = Compare({"cm1":cm1, "cm2":cm2})
Expand Down Expand Up @@ -156,11 +156,11 @@
>>> cm.brier_score()
Traceback (most recent call last):
...
pycm.pycm_error.pycmVectorError: Actual vector contains strings; pos_class must be explicitly specified.
pycm.pycm_error.pycmVectorError: Actual vector contains strings; `pos_class` must be explicitly specified.
>>> cm.log_loss()
Traceback (most recent call last):
...
pycm.pycm_error.pycmVectorError: Actual vector contains strings; pos_class must be explicitly specified.
pycm.pycm_error.pycmVectorError: Actual vector contains strings; `pos_class` must be explicitly specified.
>>> matrix = [[1, 2, 3], [4, 6, 1], [1, 2, 3]]
>>> cm = ConfusionMatrix(matrix=matrix, classes=["L1", "L1", "L3", "L2"])
Traceback (most recent call last):
Expand Down

0 comments on commit 9e5fbfc

Please sign in to comment.