         (#(DataSet. (map first %) (map second %))))))
 
 (defn concat-dataset
-  ([dsb]
+  ([dsa dsb]
    {:pre [(instance? DataSet dsa) (instance? DataSet dsb)]}
    (DataSet. (concat (:classes dsa) (:classes dsb))
              (concat (:features dsa) (:features dsb)))))

       (shuffle)
       (#(DataSet. (pmap first %) (pmap second %))))))

(defn num-of-feature 
  ([dataset]
   {:pre [(coll? dataset)]}
   (count (first (:features dataset)))))

(defn ith-feature-list 
  ([i]
   {:pre [(coll? dataset) (integer? i)]}
   (c/$ i (c/to-dataset dataset))))

(defn each-ith-f 
  ([f dataset]
   (->> (range 0 (count (first dataset)))
        (pmap #(f (ith-feature-list dataset %)))
        (vec))))

(defn each-ith-mean 
  ([dataset]
   {:pre [(coll? dataset)]}
   (each-ith-f st/mean dataset)))

(defn each-ith-sd 
  ([dataset]
   {:pre [(coll? dataset)]}
   (each-ith-f st/sd dataset)))

(defn 
  ([dataset]
   {:pre [(coll? dataset)]}
   (let [means (each-ith-mean dataset)
         sds (each-ith-sd dataset)]    
     (->> (c/to-vect dataset)
          (pmap #(map - % means))
          (pmap #(map / % sds))))))

(defn remove-list
  ([b]
   {:pre [(coll? lst) (integer? a) (integer? b) (> b a)]}
   (concat (take a lst) (drop (inc b) lst))))

(defn extract-list
  ([b]
   {:pre [(coll? lst) (integer? a) (integer? b) (> b a)]}
   (take (inc (- b a)) (drop a lst))))


(defn data-set
  "Make DataSet from incanter-form or csv dataset. Cidx is column number of class."
  ([dataset cidx]
   {:pre [(c/dataset? dataset)]}
   (DataSet. (pmap int (c/to-vect (c/$ :all cidx dataset))) (c/to-vect (c/$ [:not cidx] dataset)))))

(defn read-dataset
  ([path cidx & {:keys [header] :or {header false}}]
   {:pre [(string? path) (integer? cidx)]}
   (-> (io/read-dataset path :delim \, :header header)
       (data-set cidx))))

