(self)
| 29 | print "pattern.metrics.duration()" |
| 30 | |
| 31 | def test_confustion_matrix(self): |
| 32 | # Assert 2 true positives (TP) and 1 false positive (FP). |
| 33 | v = metrics.confusion_matrix(lambda document: True, self.documents) |
| 34 | self.assertEqual(v, (2,0,1,0)) |
| 35 | # Assert 1 true negative (TN) and 2 false negatives (FN). |
| 36 | v = metrics.confusion_matrix(lambda document: False, self.documents) |
| 37 | self.assertEqual(v, (0,1,0,2)) |
| 38 | print "pattern.metrics.confusion_matrix()" |
| 39 | |
| 40 | def test_accuracy(self): |
| 41 | # Assert 2.0/3.0 (two out of three correct predictions). |
nothing calls this directly
no test coverage detected