diff options
author | Patrick Simianer <p@simianer.de> | 2016-01-09 17:29:06 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-01-09 17:29:06 +0100 |
commit | 27e33ffefd1243887b5cd78984310d9c4d4e88d4 (patch) | |
tree | 781687b1cf236e12008ce6c8700ce3b99167461a /lib | |
parent | fa12d1ab2963a810d0114e4a45f8efa5941fc569 (diff) |
Diffstat (limited to 'lib')
-rw-r--r-- | lib/zipf/SparseVector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zipf/SparseVector.rb b/lib/zipf/SparseVector.rb index 456aeb2..8a1cff7 100644 --- a/lib/zipf/SparseVector.rb +++ b/lib/zipf/SparseVector.rb @@ -151,7 +151,7 @@ class SparseVector < Hash self.dot(other)/(self.magnitude*other.magnitude) end - def euclidian_dist other + def euclidean_dist other dims = [self.keys, other.keys].flatten.uniq sum = 0.0 dims.each { |d| sum += (self[d] - other[d])**2 } |