diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-26 15:59:42 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-26 15:59:42 +0200 |
commit | 65eb02eabeb7fece614d93ed4a2dcc9f62867bc5 (patch) | |
tree | 326d18d3bc80515aff61bddfb9901975f55070f8 /lib/model.rb | |
parent | 3922c8e5fcb9fbe6ddedab9f70e114717ff33a60 (diff) | |
parent | a1135de5d9911838f4c020d73be9c462cba709d1 (diff) |
Merge branch 'development' into svm_matrix
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/model.rb b/lib/model.rb index 28c05a9..cb24f23 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -208,7 +208,7 @@ module OpenTox # AM: Balanced predictions addon = (modulo[1].to_f/modulo[0]).ceil # what will be added in each round - slack = modulo[1].divmod(addon)[1] # what remains for the last round + slack = (addon!=0 ? modulo[1].divmod(addon)[1] : 0) # what remains for the last round position = 0 predictions = Array.new |