Update test cases in tests.py
Browse files
tests.py
CHANGED
@@ -1,12 +1,32 @@
|
|
1 |
test_cases = [
|
2 |
{
|
3 |
-
"references": [
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
"result": {
|
6 |
-
"accuracy": 0.
|
7 |
-
"hierarchical_precision": 0.
|
8 |
"hierarchical_recall": 1.0,
|
9 |
-
"hierarchical_fmeasure": 0.
|
10 |
},
|
11 |
},
|
12 |
{
|
@@ -24,9 +44,9 @@ test_cases = [
|
|
24 |
"predictions": ["1112"],
|
25 |
"result": {
|
26 |
"accuracy": 0.0,
|
27 |
-
"hierarchical_precision": 0.
|
28 |
-
"hierarchical_recall": 0.
|
29 |
-
"hierarchical_fmeasure": 0.
|
30 |
},
|
31 |
},
|
32 |
{
|
@@ -34,9 +54,9 @@ test_cases = [
|
|
34 |
"predictions": ["1120"],
|
35 |
"result": {
|
36 |
"accuracy": 0.0,
|
37 |
-
"hierarchical_precision": 0.
|
38 |
-
"hierarchical_recall": 0.
|
39 |
-
"hierarchical_fmeasure": 0.
|
40 |
},
|
41 |
},
|
42 |
{
|
@@ -49,4 +69,44 @@ test_cases = [
|
|
49 |
"hierarchical_fmeasure": 0.25,
|
50 |
},
|
51 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
]
|
|
|
1 |
test_cases = [
|
2 |
{
|
3 |
+
"references": [
|
4 |
+
"1111",
|
5 |
+
"1111",
|
6 |
+
"1111",
|
7 |
+
"1111",
|
8 |
+
"1111",
|
9 |
+
"1111",
|
10 |
+
"1111",
|
11 |
+
"1111",
|
12 |
+
"1111",
|
13 |
+
],
|
14 |
+
"predictions": [
|
15 |
+
"1111",
|
16 |
+
"1112",
|
17 |
+
"1120",
|
18 |
+
"1211",
|
19 |
+
"2111",
|
20 |
+
"111",
|
21 |
+
"11",
|
22 |
+
"1",
|
23 |
+
"9999",
|
24 |
+
],
|
25 |
"result": {
|
26 |
+
"accuracy": 0.1111111111111111,
|
27 |
+
"hierarchical_precision": 0.2,
|
28 |
"hierarchical_recall": 1.0,
|
29 |
+
"hierarchical_fmeasure": 0.33333333333333337,
|
30 |
},
|
31 |
},
|
32 |
{
|
|
|
44 |
"predictions": ["1112"],
|
45 |
"result": {
|
46 |
"accuracy": 0.0,
|
47 |
+
"hierarchical_precision": 0.6,
|
48 |
+
"hierarchical_recall": 0.6,
|
49 |
+
"hierarchical_fmeasure": 0.6,
|
50 |
},
|
51 |
},
|
52 |
{
|
|
|
54 |
"predictions": ["1120"],
|
55 |
"result": {
|
56 |
"accuracy": 0.0,
|
57 |
+
"hierarchical_precision": 0.3,
|
58 |
+
"hierarchical_recall": 0.3,
|
59 |
+
"hierarchical_fmeasure": 0.3,
|
60 |
},
|
61 |
},
|
62 |
{
|
|
|
69 |
"hierarchical_fmeasure": 0.25,
|
70 |
},
|
71 |
},
|
72 |
+
{
|
73 |
+
"references": ["1111"],
|
74 |
+
"predictions": ["2111"],
|
75 |
+
"result": {
|
76 |
+
"accuracy": 0.0,
|
77 |
+
"hierarchical_precision": 0.1,
|
78 |
+
"hierarchical_recall": 0.1,
|
79 |
+
"hierarchical_fmeasure": 0.10000000000000002,
|
80 |
+
},
|
81 |
+
},
|
82 |
+
{
|
83 |
+
"references": ["1111"],
|
84 |
+
"predictions": ["111"],
|
85 |
+
"result": {
|
86 |
+
"accuracy": 0.0,
|
87 |
+
"hierarchical_precision": 0.75,
|
88 |
+
"hierarchical_recall": 0.3,
|
89 |
+
"hierarchical_fmeasure": 0.4285714285714285,
|
90 |
+
},
|
91 |
+
},
|
92 |
+
{
|
93 |
+
"references": ["1111"],
|
94 |
+
"predictions": ["11"],
|
95 |
+
"result": {
|
96 |
+
"accuracy": 0.0,
|
97 |
+
"hierarchical_precision": 0.5,
|
98 |
+
"hierarchical_recall": 0.2,
|
99 |
+
"hierarchical_fmeasure": 0.28571428571428575,
|
100 |
+
},
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"references": ["1111"],
|
104 |
+
"predictions": ["1"],
|
105 |
+
"result": {
|
106 |
+
"accuracy": 0.0,
|
107 |
+
"hierarchical_precision": 0.25,
|
108 |
+
"hierarchical_recall": 0.1,
|
109 |
+
"hierarchical_fmeasure": 0.14285714285714288,
|
110 |
+
},
|
111 |
+
},
|
112 |
]
|