(self)
| 888 | self.assertTrue(F >= 0.92) |
| 889 | |
| 890 | def test_svm(self): |
| 891 | try: |
| 892 | from pattern.vector import svm |
| 893 | except ImportError, e: |
| 894 | print e |
| 895 | return |
| 896 | # Assert support vector classification. |
| 897 | self._test_classifier(vector.SVM, type=vector.SVC, kernel=vector.LINEAR) |
| 898 | # Assert the accuracy of the classifier. |
| 899 | A, P, R, F = vector.SVM.test(self.model, folds=10, type=vector.SVC, kernel=vector.LINEAR) |
| 900 | #print A, P, R, F |
| 901 | self.assertTrue(P >= 0.93) |
| 902 | self.assertTrue(R >= 0.93) |
| 903 | self.assertTrue(F >= 0.93) |
| 904 | |
| 905 | def test_liblinear(self): |
| 906 | # If LIBLINEAR can be loaded, |
nothing calls this directly
no test coverage detected