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

Method confusion_matrix

pattern/vector/__init__.py:1824–1829  ·  view source on GitHub ↗

Returns the confusion matrix for the given test data, which is a list of Documents or (document, type)-tuples.

(self, documents=[])

Source from the content-addressed store, hash-verified

1822 return A, P, R, F
1823
1824 def confusion_matrix(self, documents=[]):
1825 """ Returns the confusion matrix for the given test data,
1826 which is a list of Documents or (document, type)-tuples.
1827 """
1828 documents = [isinstance(d, Document) and (d, d.type) or d for d in documents]
1829 return ConfusionMatrix(self.classify, documents)
1830
1831 def auc(self, documents=[], k=10):
1832 """ Returns the area under the ROC-curve.

Callers 3

_testMethod · 0.95
aucMethod · 0.95

Calls 1

ConfusionMatrixClass · 0.85

Tested by 1