Liking cljdoc? Tell your friends :D

scicloj.metamorph.ml.metrics

Excellent metrics tools from the cortex project.

Excellent metrics tools from the cortex project.
raw docstring

accuracyclj

(accuracy y y_hat)

First argument y is the true class, y_hat is the predicted value. Returns the percentage correct.

First argument `y` is the true class, `y_hat` is the predicted value.
Returns the percentage correct.
sourceraw docstring

AICclj

(AIC model y yhat feature-count)
source

all-metricsclj

(all-metrics labels predictions label->class-fn iou-fn iou-threshold)

Returns global and per-class metrics for a given set of labels and predictions.

  • label->class-fn should take a label or prediction and return the class as a string or keyword.
  • iou-fn should take a label and prediction and return the intersection over union score
  • iou-threshold determines what iou value constitutes a matching bounding box. ** NOTE: If labels and predictions are produced from a sequence of images, ensure that the bounding boxes are shifted in each image so that there is not an overlap.
Returns global and per-class metrics for a given set of labels and predictions.
- label->class-fn should take a label or prediction and return the class as a string or keyword.
- iou-fn should take a label and prediction and return the intersection over union score
- iou-threshold determines what iou value constitutes a matching bounding box.
** NOTE: If labels and predictions are produced from a sequence of images,
   ensure that the bounding boxes are shifted in each image so that there is not an overlap.
sourceraw docstring

BICclj

(BIC model y yhat sample-size feature-count)
source

eer-accuracyclj

(eer-accuracy y y_est)
(eer-accuracy y y_est bins)

Returns the accuracy where TPR and FPR are balanced, as well as the threshold value where this balance is obtained. ROC-EER is the standard accuracy measurement in facial recognition.

Returns the accuracy where TPR and FPR are balanced, as well as the
threshold value where this balance is obtained. ROC-EER is the standard
accuracy measurement in facial recognition.
sourceraw docstring

equal-error-pointclj

(equal-error-point y y_est)
(equal-error-point y y_est bins)

Given y and the continuous, normalized output of a predictor's estimates of binary class predictions corresponding to y_hat, select the threshold which minimizes the difference between true and false positive rates.

Given y and the continuous, normalized output of a predictor's estimates of
binary class predictions corresponding to y_hat, select the threshold which
minimizes the difference between true and false positive rates.
sourceraw docstring

error-rateclj

(error-rate y y_hat)

First argument y is the true class, y_hat is the predicted value. Returns the percentage error rate.

First argument `y` is the true class, `y_hat` is the predicted value.
Returns the percentage error rate.
sourceraw docstring

false-negativesclj

(false-negatives y y_hat)

Returns array with 1. values assigned to false negatives.

Returns array with 1. values assigned to false negatives.
sourceraw docstring

false-positivesclj

(false-positives y y_hat)

Returns array with 1. values assigned to false positives.

Returns array with 1. values assigned to false positives.
sourceraw docstring

fnrclj

(fnr y y_hat)

The false negative rate, using the strict ROC definition.

The false negative rate, using the strict ROC definition.
sourceraw docstring

fprclj

(fpr y y_hat)

The false negative rate, using the strict ROC definition.

The false negative rate, using the strict ROC definition.
sourceraw docstring

precisionclj

(precision y y_hat)

Returns precision for a binary classifier, a measure of false positive rate

Returns precision for a binary classifier, a measure of false positive rate
sourceraw docstring

recallclj

(recall y y_hat)

Returns recall for a binary classifier, a measure of false negative rate

Returns recall for a binary classifier, a measure of false negative rate
sourceraw docstring

roc-curveclj

(roc-curve y y_est)
(roc-curve y y_est bins)

Compute an ROC curve with bins level of discretization for threshold values between 0.0 and 1.0 to compute true and false positive rates for.

This is not at all an ideal implementation, just a stand in that is useful for certain problems until a real alternative is provided.

Compute an ROC curve with `bins` level of discretization for threshold values
between 0.0 and 1.0 to compute true and false positive rates for.

This is not at all an ideal implementation, just a stand in that is useful
for certain problems until a real alternative is provided.
sourceraw docstring

thresholdclj

(threshold y_est thresh)

Return a binary mask of all values above threshold.

Return a binary mask of all values above threshold.
sourceraw docstring

tprclj

(tpr y y_hat)

The true positive rate, using the strict ROC definition.

The true positive rate, using the strict ROC definition.
sourceraw docstring

true-negativesclj

(true-negatives y y_hat)

Returns array with 1. values assigned to true negatives.

Returns array with 1. values assigned to true negatives.
sourceraw docstring

true-positivesclj

(true-positives y y_hat)

Returns array with 1. values assigned to true positives.

Returns array with 1. values assigned to true positives.
sourceraw docstring

unit-spaceclj

(unit-space divs)

Returns an array with divs+1 values that evenly divide a space from 0.0 to 1.0, inclusive.

Returns an array with divs+1 values that evenly divide a space from 0.0 to
1.0, inclusive.
sourceraw docstring

wrongsclj

(wrongs y y_hat)

Given y array of ground truth labels and y_hat classifier predictions, returns array with 1.0 values where y does not equal y_hat.

Given `y` array of ground truth labels and `y_hat` classifier predictions,
returns array with 1.0 values where `y` does not equal `y_hat`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close