Skip to content

Commit

Permalink
documented confusion-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
behrica committed Mar 21, 2024
1 parent f82bc40 commit 614f900
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 10 additions & 3 deletions src/scicloj/metamorph/ml/viz.clj
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,18 @@


(defn confusion-matrix
(
[predicted-labels labels
"Generates a confusin matrix plot out of `predicted-labels` and `labels`
`opts`
`normalize` : Can be :none (default) or :all and decides if the values in the matrix are counts or percentages.
`hanami-opts` Options passed to hanami to control the plot. Can be any of the default hanami
substituions keys.
"
([predicted-labels labels
opts
hanami-opts]

(->
(scicloj.metamorph.ml.viz.confusionmatrix/cm-values predicted-labels labels opts)
(scicloj.metamorph.ml.viz.confusionmatrix/confusion-matrix-chart)
Expand Down
2 changes: 0 additions & 2 deletions src/scicloj/metamorph/ml/viz/confusionmatrix.clj
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
(ns scicloj.metamorph.ml.viz.confusionmatrix
(:require
[aerial.hanami.common :as hc]
[aerial.hanami.templates :as ht]
[scicloj.metamorph.ml.classification :as cl]
[scicloj.metamorph.ml.learning-curve]
[scicloj.metamorph.ml.viz.learning-curve]))




(def layer
[(assoc ht/rect-layer :encoding ht/xy-encoding)
(assoc ht/text-layer
Expand Down

0 comments on commit 614f900

Please sign in to comment.