         (assoc :Precision (/ TP (+ TP FP))))))
 
 (defn confusion-matrix [preds facts exp]
-  {:pre [(coll? preds) (coll? facts) (map? exp)]}
+  {:pre [(coll? preds) (coll? facts) (map? exp)]
+   ;; :post [(map? %)]
+   }
   (if (or (empty? preds) (empty? facts))
     (exp-result exp)
     (let [pred (first preds)


(defn train-model
  ([dataset L & {:keys [norm] :or {norm false}}]
   {:pre [(instance? DataSet dataset) (integer? L)]}
   (let [normf (if norm data/normalize identity)
         d (data/num-of-feature dataset)
         ass (make-ass d L)

  "Return output of hidden-layer_i with xs. As_i is d-dimension. B_i is number.
   Xs is d-dimension."
  ([as_i b_i xs]
   {:pre [(coll? as_i) (number? b_i) (coll? xs)]
    :post [(float? %)]}
   (g (+ (c/inner-product as_i xs)
         b_i))))

