             [clojure [pprint :as pp]]))
 
 (defprotocol FeatureExtractor
-  (features [this subreddit-weight]))
+  (features [this user-weight subreddit-weight]))
 
 (defprotocol Affinity
   (value [this]))

  (value [this] (Float/valueOf value-str))

  FeatureExtractor
  (features [this subreddit-weight]
    [(subreddit-weight subreddit) (value this)]))

(defn -main
  ([]

   (with-open [r (io/reader file)]
     (let [data (i/sample (next (data/read-csv r)) :size 10000 :replacement false)
           affinities (map (partial apply ->RedditAffinity) data)
           user->subreddit-count (frequencies (map :user affinities))
           subreddit->user-count (frequencies (map :subreddit affinities))
           feature-extractor #(features % user->subreddit-count subreddit->user-count)
           k 4
           max-iters 10
           clusters (cluster/k-means affinities i/euclidean-distance feature-extractor k max-iters)]
