from proteinshake.tasks import GeneOntologyTask
task = GeneOntologyTask()
task.evaluate(np.random.rand(len(task.test_index), len(task.token_map.keys())))
Gives this error:
File "/Users/cgonzalez/Projects/proteinshake/proteinshake/tasks/gene_ontology.py", line 94, in evaluate
'Fmax': self.fmax(y_pred),
File "/Users/cgonzalez/Projects/proteinshake/proteinshake/tasks/gene_ontology.py", line 72, in fmax
return max([
File "/Users/cgonzalez/Projects/proteinshake/proteinshake/tasks/gene_ontology.py", line 73, in <listcomp>
2 * self.precision(y_pred, t) * self.recall(y_pred, t)
File "/Users/cgonzalez/Projects/proteinshake/proteinshake/tasks/gene_ontology.py", line 61, in recall
np.logical_and(y_true, y_pred).sum(axis=1)
ZeroDivisionError: division by zero
Gives this error: