From 5b844250a7d3be05e3139e0ca3c819c3da8ee4f6 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 9 Sep 2015 14:49:35 +0200 Subject: fminer classification fixed --- lib/classification.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/classification.rb') diff --git a/lib/classification.rb b/lib/classification.rb index 0d47983..ab1efd8 100644 --- a/lib/classification.rb +++ b/lib/classification.rb @@ -3,7 +3,8 @@ module OpenTox class Classification - def self.weighted_majority_vote compound, neighbors + def self.weighted_majority_vote compound, params + neighbors = params[:neighbors] return {:value => nil,:confidence => nil,:warning => "Cound not find similar compounds."} if neighbors.empty? weighted_sum = {} sim_sum = 0.0 -- cgit v1.2.3