hosa.helpers.functions.metrics_multiclass
- hosa.helpers.functions.metrics_multiclass(y_true, y_probs, n_classes, imbalance_correction=False)[source]
Computes the performance metrics for classification problems. This function supports multiclass classification, being, in this case, the metrics given in terms of the average value, or weighed average if imbalance_correction=True.
- Parameters
y_true (numpy.ndarray) – Ground truth (correct) labels.
y_probs (numpy.ndarray) – Probability estimates.
n_classes (int) – Number of classes (or labels) of the classification problem.
imbalance_correction (bool) – True if correction for imbalance should be applied to the
otherwise. (metrics; False) –
- Returns
(tuple) – Returns a tuple with the metrics for AUC, accuracy, sensitivity, and specificity.