summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-20 10:05:42 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-20 10:05:42 +0200
commitde4d04a7f30e1c1743c14b81ee977fe5e750c5c8 (patch)
tree8d0fa3d8da3e6a944883dfbcb2e51d324b612b89
parentafaab75c94d4d87aa985b5ef6a21bf724727c21f (diff)
Fixed common_p_sum
-rw-r--r--lib/algorithm.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index 528c426..352538b 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -184,6 +184,7 @@ module OpenTox
# all_p_sum += Algorithm.gauss(all_p)
#}
else
+ common_p_sum = 0.0
common_features.each{|f| common_p_sum += Algorithm.gauss(weights[f])}#*Algorithm.support(f,params))}
all_p_sum = 0.0
all_features.each{|f| all_p_sum += Algorithm.gauss(weights[f])}#*Algorithm.support(f,params))}
@@ -873,7 +874,7 @@ module OpenTox
end
# Returns Support value of an fingerprint
- # @param [Hash] params Keys: `:weights, :fingerprints, :features, :compound, :nr_hits:, :mode` are required
+ # @param [Hash] params Keys: `:compound_features_hits, :weights, :fingerprints, :features, :compound, :nr_hits:, :mode` are required
# return [Numeric] Support value
def self.p_sum_support(params)
p_sum = 0.0