summaryrefslogtreecommitdiff
path: root/lib/classification.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2015-09-09 14:49:35 +0200
committerChristoph Helma <helma@in-silico.ch>2015-09-09 14:49:35 +0200
commit5b844250a7d3be05e3139e0ca3c819c3da8ee4f6 (patch)
tree088673e23af87fb65baf9027c470b8512b9a0855 /lib/classification.rb
parentb10d1394564fbc3a9fb7a9b5eb57038b4dcf08ed (diff)
fminer classification fixed
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