From c1be8fe66f640d44dbbc9bfe5212733994bfb9c5 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 9 May 2016 15:44:29 +0200 Subject: physchem crossvalidation fixed, test_compound_descriptor_parameters assertions fixed --- 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 691f903..2eaae73 100644 --- a/lib/regression.rb +++ b/lib/regression.rb @@ -94,7 +94,7 @@ module OpenTox data_frame[0][i] = act n["tanimoto"] ? weights << n["tanimoto"] : weights << 1.0 # TODO cosine ? neighbor.physchem_descriptors.each do |pid,values| - values = [values] if values.is_a? Float + values = [values] unless values.is_a? Array values.uniq! warn "More than one value for '#{Feature.find(pid).name}': #{values.join(', ')}. Using the median." unless values.size == 1 j = pc_ids.index(pid)+1 -- cgit v1.2.3