def evaluate(self, text):
cx = BinaryConfusion()<EOL>for (L, P, R, gold, _) in Detector.candidates(text):<EOL><INDENT>guess = self.predict(L, P, R)<EOL>cx.update(gold, guess)<EOL>if not gold and guess:<EOL><INDENT>logger.debug("<STR_LIT>".format(L, R))<EOL><DEDENT>elif gold and not guess:<EOL><INDENT>logger.debug("<STR_LIT>".format(L, R))<EOL><DEDENT><DEDENT>return cx<EOL>
Given a string of `text`, compute confusion matrix for the
classification task.