From abc3526e318a2bfa24dfe033d8879e7657c2ae5c Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 15 Mar 2016 18:46:34 +0100 Subject: single tests pass --- lib/regression.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/regression.rb') 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 -- cgit v1.2.3