scicloj.metamorph.ml.viz

deprecated in 1.7.0

apply-xform-kvs

(apply-xform-kvs spec kvs)

confusion-matrix

deprecated in 1.7.0

(confusion-matrix predicted-labels labels opts hanami-opts)(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.

learning-curve

deprecated in 1.7.0

(learning-curve dataset pipe-fn train-sizes lc-opts hanami-opts)(learning-curve dataset pipe-fn lc-opts)(learning-curve dataset pipe-fn lc-opts hanami-opts)

Generates a learning curve.

The functions splits the dataset in a fixed size test set and increasingly larger training sets. A model is trained at each step and evaluated.

Returns a vega lite spec of the learninig curve plot.

  • dataset the TMD dataset to use
  • train-sizes vector of double from 0 to 1, controlling the sizes of the training data.
  • lc-opts
    • k At each step a k cross-validation is done
    • metric-fn the metric to use for evaluation the model
    • loss-or-accuracy If the metric-fn calculates :loss or :accuracy
  • hanami-opts Options passed to hanami to control the plot. Can be the default hanami substituions keys or:
    • TRAIN-COLOR: Color used for the train curve (default: blue)
    • TEST-COLOR: Color used for the test curve (default: orange)