diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-09 05:53:45 -0700 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-09 05:53:45 -0700 |
commit | 88af0ff8e54406f6bd4322a2d0ea93ade2c5bbbd (patch) | |
tree | 44e3bbcd178fc0d6cc4a629b7e9787bd30ad2760 /lib | |
parent | 4d8ca4a4d057a197dbfe34e16950ea5433e9819a (diff) |
Hotfix: Gaussian Decay for neighbors
Diffstat (limited to 'lib')
-rw-r--r-- | lib/algorithm.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb index 008e7fe..abf10d4 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -165,7 +165,7 @@ module OpenTox # @param [Hash] params Keys `:similarity_algorithm,:p_values` are required # @return [Hash] Hash with keys `:prediction, :confidence` def self.local_svm_regression(neighbors,params ) - sims = neighbors.collect{ |n| n[:similarity] } # similarity values between query and neighbors + sims = neighbors.collect{ |n| Algorithm.gauss(n[:similarity]) } # similarity values between query and neighbors conf = sims.inject{|sum,x| sum + x } acts = neighbors.collect do |n| act = n[:activity] |