summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrampfion.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/rampfion.rb b/rampfion.rb
index 479ca2b..23bedcb 100755
--- a/rampfion.rb
+++ b/rampfion.rb
@@ -67,6 +67,7 @@ end
def adjust_model_scores kbest, factor
min = kbest.map{ |k| k.scores[:decoder] }.min
max = kbest.map{ |k| k.scores[:decoder] }.max
+ return if min==0&&max==0
kbest.each { |k| k.scores[:decoder] = factor*((k.scores[:decoder]-min)/(max-min)) }
end