summaryrefslogtreecommitdiff
path: root/lib/regression.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2016-03-15 18:46:34 +0100
committerChristoph Helma <helma@in-silico.ch>2016-03-15 18:46:34 +0100
commitabc3526e318a2bfa24dfe033d8879e7657c2ae5c (patch)
treeb11500952085d6a771f845431258c7befae5fd04 /lib/regression.rb
parent7c3bd90c26dfeea2db3cf74a1cefc23d8dece7c0 (diff)
single tests pass
Diffstat (limited to 'lib/regression.rb')
-rw-r--r--lib/regression.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/regression.rb b/lib/regression.rb
index b8efd30..6b08fd8 100644
--- a/lib/regression.rb
+++ b/lib/regression.rb
@@ -62,7 +62,7 @@ module OpenTox
else
compound_features = variables.collect{|f| compound.fingerprint.include?(f) ? "T" : "F"}
prediction = r_model_prediction method, data_frame, variables, weights, compound_features
- if prediction.nil?
+ if prediction.nil? or prediction[:value].nil?
prediction = local_weighted_average(compound, params)
prediction[:warning] = "Could not create local PLS model. Using weighted average of similar compounds."
return prediction