common_stats

Variables

struct [anonymous] get_classes

Get the array of classes.

Param lbl_true

array of true labels as integers

Param lbl_pred

array of predicted labels as integers

Param n_true

size of lbl_true array

Param n_pred

size of lbl_pred array

Return

Vector of classes found

struct [anonymous] get_confusion_matrix

Get the confusion matrix of the labels.

A confusion matrix, also known as an error matrix, is a specific table layout that allows visualization of the performance of an algorithm.

Param lbl_true

array of true labels as integers

Param lbl_pred

array of predicted labels as integers

Param n_lbl

size of label arrays

Param classes

array of classes

Param Nclass

size of classes array (aka number of classes)

Return

The confusion matrix as ravel array

struct [anonymous] get_TP

Get the True positive score.

A true positive test result is one that detects the condition when the condition is present (correctly identified).

Param confusion_matrix

the confusion matrix of the labels

Param Nclass

size of classes array (aka number of classes)

Return

The array of True positive scores (lenght := Nclass)

struct [anonymous] get_FN

Get the False negative score.

A false negative test result is one that does not detect the condition when the condition is present (incorrectly rejected).

Param confusion_matrix

the confusion matrix of the labels

Param Nclass

size of classes array (aka number of classes)

Return

The array of False negative scores (lenght := Nclass)

struct [anonymous] get_FP

Get the False positive score.

A false positive test result is one that detects the condition when the condition is absent (incorrectly identified).

Param confusion_matrix

the confusion matrix of the labels

Param Nclass

size of classes array (aka number of classes)

Return

The array of False positive scores (lenght := Nclass)

struct [anonymous] get_TN

Get the True negative score.

A true negative test result is one that does not detect the condition when the condition is absent (correctly rejected).

Param confusion_matrix

the confusion matrix of the labels

Param Nclass

size of classes array (aka number of classes)

Return

The array of True negative scores (lenght := Nclass)

struct [anonymous] get_POP

Get the Total sample size.

POP = TP + TN + FN + FP

Param TP

array of true positives

Param TN

array of true negatives

Param FP

array of false positives

Param FN

array of false negative

Param Nclass

size of classes array (aka number of classes)

Return

The array of total samples for each class.

struct [anonymous] get_P

Number of positive samples.

Also known as support (the number of occurrences of each class in y_true).

P = TP + FN

Param TP

array of true positives

Param FN

array of false negative

Param Nclass

size of classes array (aka number of classes)

Return

The array of the number of positive samples for each class.

struct [anonymous] get_N

Number of negative samples.

N = TN + FP

Param TN

array of true negatives

Param FP

array of false positives

Param Nclass

size of classes array (aka number of classes)

Return

The array of the number of negative samples for each class