Skip to content
Snippets Groups Projects
Commit f885cb50 authored by Franck Dary's avatar Franck Dary
Browse files

Avoid division by 0 in eval script

parent 053c878b
No related branches found
No related tags found
No related merge requests found
......@@ -456,8 +456,8 @@ def evaluate(gold_ud, system_ud, extraColumns) :
goldValues.append(float(goldItem))
predictedValues.append(float(systemItem))
R2 = None
if isNumericOnly :
R2 = 0.0
if isNumericOnly and len(goldValues) > 0 :
correct[0] /= len(goldValues)
correct[1] /= len(goldValues)
goldMean = sum(goldValues) / len(goldValues)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment