Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 13, 2023
1 parent 45b527f commit a4874e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions elk/metrics/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def calc_auroc(

return auroc


def calc_calibrated_accuracies(y_true, pos_probs) -> AccuracyResult:
"""
Calculate the calibrated accuracies
Expand All @@ -106,6 +107,7 @@ def calc_calibrated_accuracies(y_true, pos_probs) -> AccuracyResult:
cal_acc = accuracy_ci(y_true, cal_preds)
return cal_acc


def calc_calibrated_errors(y_true, pos_probs) -> CalibrationEstimate:
"""
Calculate the expected calibration error.
Expand All @@ -122,6 +124,7 @@ def calc_calibrated_errors(y_true, pos_probs) -> CalibrationEstimate:
cal_err = cal.compute()
return cal_err


def calc_accuracies(y_logits, y_true) -> AccuracyResult:
"""
Calculate the accuracy
Expand Down

0 comments on commit a4874e1

Please sign in to comment.