     ;;TODO abandon tsne for a simple dxd grid of 2d scatter plots
 
     (clojure.pprint/pprint displayable)
-    ;(clojure.pprint/pprint sorted-stats)
+    (clojure.pprint/pprint sorted-stats)
     )
   )
       (spit (str prefix "-" (name id) ".svg"))))

(defn display-state [props grid-cells]
  #_(let [cluster-positions (remove nil? (map (fn [[pos-idx char-vec]]
                                                (let [cluster (::core/cluster char-vec)]
                                                  (if-not (or (= nil cluster)
                                                              (= "NO_CLASS" cluster))
                                                    pos-idx)))
                                              grid-cells))]
      (if (= 2 (::core/dimensions props))
        {"none" cluster-positions}
        (let [_            (println "cluster positions: " cluster-positions)
              input-matrix (matrix/array :vectorz cluster-positions)
              _            (println "input mat;" input-matrix)
              algo-name    :parallel-bht
              _            (println "tsne: " algo-name)
              output-map   {algo-name (tsne/tsne input-matrix 2 :tsne-algorithm algo-name :perplexity 0.01)}]
          output-map)))
  (let [hm1 (grids-2d->heatmap-vec grid-cells props)
        hm2 (grids-2d->heatmap-vec grid-cells props)]

    (cartesian-viz "hm" :rainbow2 (:matrix hm1) (:cols hm1) (:rows hm1))
    (cartesian-viz "hm" :orange-blue (:matrix hm2) (:cols hm2) (:rows hm2)))
  )



  (->> (for [y (range 10) x (range 50)] (n/noise2 (* x 0.1) (* y 0.25)))
       (viz/matrix-2d 50 10)))

(defn grids-2d->heatmap-vec [grid-cells props & {:keys [clusters-only]}]
  (let [phase-space (::core/phase-space props)
        d1          (first phase-space)
        d2          (second phase-space)
