Skip to content

Instantly share code, notes, and snippets.

@tutysara
Created September 5, 2012 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tutysara/3638406 to your computer and use it in GitHub Desktop.
Save tutysara/3638406 to your computer and use it in GitHub Desktop.
(defn normalize
"Normalizes data"
[dataseq]
(let [mean (stats/mean dataseq)
normalfn (fn [x] (/ (- x mean) mean))]
(map normalfn dataseq)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment