Returns the confusion matrix for the given test data, which is a list of Documents or (document, type)-tuples.
(self, documents=[])
| 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. |