We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bfed388 + 76c5cb1 commit a63f0e9Copy full SHA for a63f0e9
tests/test_recall.py
@@ -65,12 +65,20 @@ def test_recall_function(self):
65
"""Teest of ts_recall function.
66
"""
67
68
- real = np.array([1, 1, 0, 0, 0])
69
- pred = np.array([1, 1, 1, 1, 0])
+ # test case1
+ real = np.array([1, 0, 0, 0, 0])
70
+ pred = np.array([1, 1, 0, 0, 0])
71
72
score = ts_recall(real, pred)
73
self.assertEqual(score, 1.0)
74
75
+ # test case2
76
+ real = np.array([1, 1, 0, 0, 0])
77
+ pred = np.array([0, 0, 1, 1, 1])
78
+
79
+ score = ts_recall(real, pred)
80
+ self.assertEqual(score, 0.0)
81
82
def test_recall_function_with_list(self):
83
"""Teest of ts_recall function with list type arguments.
84
0 commit comments