summaryrefslogtreecommitdiff
path: root/lib/classification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classification.rb')
-rw-r--r--lib/classification.rb3
1 files changed, 2 insertions, 1 deletions
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