Skip to content

Commit

Permalink
Changed the distance function to actually return the distance between…
Browse files Browse the repository at this point in the history
… two words rather than their similarity (1 - distance).
  • Loading branch information
owo committed Dec 20, 2014
1 parent f685ed6 commit d41a307
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glove/glove.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _distance(self, word1_vec, word2_vec):
/ np.linalg.norm(word1_vec)
/ np.linalg.norm(word2_vec))

return dst
return 1 - dst

def distance(self, word1, word2):
"""
Expand Down

0 comments on commit d41a307

Please sign in to comment.