diff --git a/hiclass/metrics.py b/hiclass/metrics.py index d05940e1..b5c36d35 100644 --- a/hiclass/metrics.py +++ b/hiclass/metrics.py @@ -393,7 +393,7 @@ def log_loss( for level in range(make_leveled(y_true).shape[1]): scores.append(_log_loss(classifier, y_true, y_prob[level], level)) return _aggregate_scores(scores, agg) - return _multiclass_brier_score(classifier, y_true, y_prob, level) + return _log_loss(classifier, y_true, y_prob, level) def expected_calibration_error( diff --git a/tests/test_metrics.py b/tests/test_metrics.py index 75b5dba9..5125df40 100644 --- a/tests/test_metrics.py +++ b/tests/test_metrics.py @@ -478,8 +478,8 @@ def test_log_loss_single_level(uncertainty_data_multi_level): log_loss_1 = log_loss(classifier, y_true, prob, level=1) log_loss_2 = log_loss(classifier, y_true, [prob], level=1) - assert math.isclose(log_loss_1, 0.48793, abs_tol=1e-4) - assert math.isclose(log_loss_2, 0.48793, abs_tol=1e-4) + assert math.isclose(log_loss_1, 0.81349, abs_tol=1e-4) + assert math.isclose(log_loss_2, 0.81348, abs_tol=1e-4) def test_local_expected_calibration_error(uncertainty_data):