MCPcopy Index your code
hub / github.com/clips/pattern / test_bayes

Method test_bayes

test/test_vector.py:870–878  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

868 print "pattern.vector.Classifier._vector()"
869
870 def test_bayes(self):
871 # Assert Bayesian probability classification.
872 self._test_classifier(vector.Bayes)
873 # Assert the accuracy of the classifier.
874 A, P, R, F = vector.Bayes.test(self.model, folds=10, method=vector.BERNOUILLI)
875 #print A, P, R, F
876 self.assertTrue(P >= 0.89)
877 self.assertTrue(R >= 0.89)
878 self.assertTrue(F >= 0.89)
879
880 def test_knn(self):
881 # Assert nearest-neighbor classification.

Callers

nothing calls this directly

Calls 2

_test_classifierMethod · 0.95
testMethod · 0.80

Tested by

no test coverage detected