diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-31 23:28:02 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-31 23:28:02 +0200 |
commit | b435b145aea744ba951c12b4f6bf90ce62a5b0a3 (patch) | |
tree | 27f4e5d9afa210c395c44cf9f0d0e233326a6767 /lazar.rb | |
parent | d69214b494706fb53f74bb17ddde28ad831cd460 (diff) |
skip 0 regression value instead of stopping model buliding
Diffstat (limited to 'lazar.rb')
-rw-r--r-- | lazar.rb | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -157,8 +157,12 @@ post '/lazar/?' do LOGGER.warn "Unknown class \"#{value.to_s}\"." end elsif prediction_feature.feature_type == "regression" - halt 404, "0 values not allowed in training dataset. log10 is calculated internally." if value.to_f == 0 - lazar.activities[compound] << value.to_f + #never use halt in tasks, do not raise exception when, print warning instead + if value.to_f==0 + LOGGER.warn "0 values not allowed in training dataset. log10 is calculated internally. skipping compound" + else + lazar.activities[compound] << value.to_f + end end end end |