I did not explain properly the case that makes occurences = 0. Let's say you create a low number of evaluations, (number_of_evaluations = 2) and imagine you have a per class evaluation section where none of the datasets used in the evaluations contained the class "Iris-setosa". Then, the code first sets occurences to 2, and starts retrieving the per class values of each evaluation. As in each evaluation it finds class_info['present_in_test_data'] == False for the 'Iris-setosa' class, the occurences  for this class end up being 0. In this case, I guess we should do the same that is done in individual evaluations, that is, setting total['present_in_test_data'] to False and total['occurences'] to 0 (as we do) and returning no other measure value for this class. I must test it properly, but I think that's exactly what the code does, because the individual evaluations have no other information either for that class, so the for loops will do nothing and thus occurences will never be used as a denominator.