diff options
author | Christoph Helma <helma@in-silico.ch> | 2016-07-25 15:53:22 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2016-07-25 15:53:22 +0200 |
commit | 46c628f1757ce8274a0b277b3ec3306609b38c14 (patch) | |
tree | 92f66426189ff7fd612057d88428fa7cb0505a45 /lib/regression.rb | |
parent | f93aad7227c7bb3702fd28aab2d289f1ca9ce7e9 (diff) |
local_weighted_average fallback fixed, cv predictions pulled from validations to avoid mongo document size errors
Diffstat (limited to 'lib/regression.rb')
-rw-r--r-- | lib/regression.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/regression.rb b/lib/regression.rb index d034d0b..269a743 100644 --- a/lib/regression.rb +++ b/lib/regression.rb @@ -48,7 +48,7 @@ module OpenTox end if variables.empty? - prediction = local_weighted_average substance, neighbors + prediction = local_weighted_average(substance: substance, neighbors: neighbors) prediction[:warning] = "No variables for regression model. Using weighted average of similar substances." prediction else @@ -104,7 +104,7 @@ module OpenTox pc_ids.compact! if pc_ids.empty? - prediction = local_weighted_average substance, neighbors + prediction = local_weighted_average(substance: substance, neighbors: neighbors) prediction[:warning] = "No relevant variables for regression model. Using weighted average of similar substances." prediction else |