diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-07-12 13:58:27 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-07-12 13:58:27 +0200 |
commit | 2909344873532a1c7cc2a5ac80a8222e9828bc99 (patch) | |
tree | 8c63b73dddd73854c6c99ddfd2ee4132b1cf4f3a | |
parent | 1a01946eb3c89b9a672fb2c1165236c84cbaef36 (diff) |
minor fix for new regression plotting: dont count nil values as omitted value
-rw-r--r-- | report/plot_factory.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/report/plot_factory.rb b/report/plot_factory.rb index 26a9c67..bf59960 100644 --- a/report/plot_factory.rb +++ b/report/plot_factory.rb @@ -68,10 +68,12 @@ module Reports # filter out nil-predictions and <=0 predictions if log-scale wanted valid_indices = [] x_i.size.times do |i| - if x_i[i]!=nil and y_i[i]!=nil and (!logscale or (x_i[i]>0 and y_i[i]>0)) - valid_indices << i - else - omit_count += 1 + if x_i[i]!=nil and y_i[i]!=nil + if !logscale or (x_i[i]>0 and y_i[i]>0) + valid_indices << i + else + omit_count += 1 + end end end if valid_indices.size < x_i.size |