diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-03-16 15:40:46 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-03-16 15:40:46 +0100 |
commit | 91781c18c8c2c33783f30e64172f11ae9180a6d1 (patch) | |
tree | 4d6972033b6bdf87ddb7c4bbf1e8053f497defc1 | |
parent | 54867c288a046c0a747779fb6d6bcb4fe8f1d0a9 (diff) |
conversion to float in Math.gauss
-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 c8cb116..167c964 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -246,7 +246,7 @@ module OpenTox # Gauss kernel # @return [Float] def self.gauss(x, sigma = 0.3) - d = 1.0 - x + d = 1.0 - x.to_f Math.exp(-(d*d)/(2*sigma*sigma)) end |