org.apache.clojure-mxnet.eval-metric
comp-metric
(comp-metric metrics)
Create a metric instance composed out of several metrics
custom-metric
macro
(custom-metric f-eval mname)
Custom evaluation metric that takes a NDArray function.
- f-eval Customized evaluation function that takes two ndarrays and returns a number
function must be in the form of (fn [] ) clojure style
- mname The name of the metric
f1
(f1)
Calculate the F1 score of a binary classification problem.
get
(get metric)
Get the values of the metric in as a map of {name value} pairs
get-and-reset
(get-and-reset metric)
Get the values and then reset the metric
mae
(mae)
Calculate Mean Absolute Error loss
mse
(mse)
Calculate Mean Squared Error loss
perplexity
(perplexity {:keys [ignore-label axis], :as opts, :or {axis -1}})
(perplexity)
Calculate perplexity
- opts
:ignore-label Index of invalid label to ignore when counting. Usually should be -1. Include
all entries if None.
:axis The axis from prediction that was used to
compute softmax. Default is -1 which means use the last axis.
reset
(reset metric)
clear the internal statistics to an initial state
rmse
(rmse)
Calculate Root Mean Squred Error loss
top-k-accuracy
(top-k-accuracy top-k)
Calculate to k predications accuracy
- top-k number of predicts (int)
update
(update metric labels preds)
Update the internal evaluation