Skip to content

Commit

Permalink
Update eval_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasMeissnerDS committed Sep 13, 2023
1 parent 198c726 commit cf0e9a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bluecast/evaluation/eval_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ def eval_classifier(
logger(f"The balanced logloss is {bll}")
else:
bll = 99
logger(f"Skip blanced logloss as number of classes is {pd.Series(y_classes).nunique()}.")
logger(
f"Skip blanced logloss as number of classes is {pd.Series(y_classes).nunique()}."
)

if pd.Series(y_classes).nunique() <= 2:
roc_auc = roc_auc_score(y_true, y_probs)
else:
roc_auc = roc_auc_score(y_true, y_probs, multi_class='ovr')
roc_auc = roc_auc_score(y_true, y_probs, multi_class="ovr")
logger(f"The ROC auc score is {roc_auc}")
logloss = log_loss(y_true, y_probs)
logger(f"The log loss score is {logloss}")
Expand Down
Binary file modified dist/bluecast-0.21-py3-none-any.whl
Binary file not shown.
Binary file modified dist/bluecast-0.21.tar.gz
Binary file not shown.

0 comments on commit cf0e9a0

Please sign in to comment.