Add new test case for hierarchical metrics
Browse files
tests.py
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
test_cases = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
{
|
3 |
"references": ["1111"],
|
4 |
"predictions": ["1111"],
|
@@ -39,14 +49,4 @@ test_cases = [
|
|
39 |
"hierarchical_fmeasure": 0.25,
|
40 |
},
|
41 |
},
|
42 |
-
{
|
43 |
-
"references": ["1111", "1111", "1111", "1111"],
|
44 |
-
"predictions": ["1111", "1112", "1120", "1211"],
|
45 |
-
"result": {
|
46 |
-
"accuracy": 0.25,
|
47 |
-
"hierarchical_precision": 1.0,
|
48 |
-
"hierarchical_recall": 0.4,
|
49 |
-
"hierarchical_fmeasure": 0.5714285714285715,
|
50 |
-
},
|
51 |
-
},
|
52 |
]
|
|
|
1 |
test_cases = [
|
2 |
+
{
|
3 |
+
"references": ["1111", "1111", "1111", "1111"],
|
4 |
+
"predictions": ["1111", "1112", "1120", "1211"],
|
5 |
+
"result": {
|
6 |
+
"accuracy": 0.25,
|
7 |
+
"hierarchical_precision": 1.0,
|
8 |
+
"hierarchical_recall": 0.4,
|
9 |
+
"hierarchical_fmeasure": 0.5714285714285715,
|
10 |
+
},
|
11 |
+
},
|
12 |
{
|
13 |
"references": ["1111"],
|
14 |
"predictions": ["1111"],
|
|
|
49 |
"hierarchical_fmeasure": 0.25,
|
50 |
},
|
51 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
]
|