sed_eval.metric.balanced_accuracy

sed_eval.metric.balanced_accuracy(sensitivity, specificity, factor=0.5)[source]

Balanced accuracy

Wikipedia entry https://en.wikipedia.org/wiki/Accuracy_and_precision

Parameters:

sensitivity : float in [0, 1]

sensitivity.

specificity : float in [0, 1]

specificity.

factor : float in [0, 1]

Balancing factor multiplying true positive rate (sensitivity). Default value 0.5

Returns:

bacc: float

Balanced accuracy