Trains the classifier with the given document of the given type (i.e., class). A document can be a Document, Vector, dict, list or string. If no type is given, Document.type will be used instead.
(self, document, type=None)
| 2059 | Classifier.__init__(self, train, baseline) |
| 2060 | |
| 2061 | def train(self, document, type=None): |
| 2062 | """ Trains the classifier with the given document of the given type (i.e., class). |
| 2063 | A document can be a Document, Vector, dict, list or string. |
| 2064 | If no type is given, Document.type will be used instead. |
| 2065 | """ |
| 2066 | Classifier.train(self, document, type) |
| 2067 | |
| 2068 | def classify(self, document, discrete=True): |
| 2069 | """ Returns the type with the highest probability for the given document. |
no outgoing calls
no test coverage detected