 (def X (map (partial cons 1) (take 235469 mys-features)))
 (def beta (repeat 23 0))
 
-(defn one-minus
-  [coll]
-  (map #(- 1 %) coll))
+(defn feature-vec
+  [n]
+  (map (partial cons 1)
+       (for [x (range n)]
+         (take 22 (repeatedly rand)))))
+
+(defn label-vec
+  [n]
+  (for [x (range n)] (if (> (rand) 0.5) 1 0)))
 
 (defn scaled-vector
   [scalar coll]

      (if (zero? iter)
        beta
        (recur (let [inc-beta (beta-update beta labels features rdg-cons)]
                 (println "")
                 (println (flatten beta))
                 map + beta inc-beta)
               (dec iter))))))

(defn total-log-likelihood
  "returns the total log likelihood for a group of pixels; input
  labels and features for the group of pixels, aligned correctly so
  that the first label and feature correspond to the first pixel."
  [beta-seq labels features]
  (reduce + (map (partial log-likelihood beta-seq) labels features)))

