Skip to content

Instantly share code, notes, and snippets.

@dermatthias
Created November 27, 2009 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dermatthias/244055 to your computer and use it in GitHub Desktop.
Save dermatthias/244055 to your computer and use it in GitHub Desktop.
(defn euclidean
"berechnet den (modifizierten) euklidischen abstand zwischen zwei usern"
[active other]
(Math/sqrt (reduce + (map (fn [movie]
(let [features (item-map movie)]
(reduce + (map (fn [feat] (diff active other movie feat)) features)) ))
(common-items active other)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment