conn2res.performance.balanced_accuracy_score
- conn2res.performance.balanced_accuracy_score(y_true, y_pred, sample_weight=None, adjusted=None, **kwargs)[source]
Balance accuracy score. Good to deal with imbalanced datasets.
- Parameters:
y_true (numpy.ndarray) – Ground truth target values.
y_pred (numpy.ndarray) – Predicted target values.
sample_weight (numpy.ndarray) – Sample weights.
adjusted (bool) – When true, the result is adjusted for chance, so that random performance would score 0, while keeping perfect performance at a score of 1.
- Returns:
score – A floating point value.
- Return type:
float.