Skip to content

Commit

Permalink
Feat: confusion matrix 레이블 고정
Browse files Browse the repository at this point in the history
  • Loading branch information
zzangsu committed Jul 21, 2024
1 parent a3d0843 commit 3263f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autosink_model_validation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def artifact_aliases_append():
print(f"Added alias 'success' to artifact {artifact_name}")


def check_model(outputs_list, thres=0.95):
def check_model(outputs_list, thres=0.80):
# test_acc = outputs.metrics['test_accuracy']
#outputs_list:[outputs.metrics['test_accuracy'],outputs.metrics['test_accuracy'],,,]
if all(value >= thres for value in outputs_list):
Expand All @@ -37,7 +37,7 @@ def confusionmatrix(outputs, eval_dataset):
y_pred = outputs.predictions.argmax(1)

labels = eval_dataset.features['label'].names
cm = confusion_matrix(y_true, y_pred)
cm = confusion_matrix(y_true, y_pred,labels=[0, 1])
disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=labels)
disp.plot(xticks_rotation=45)
return disp

0 comments on commit 3263f43

Please sign in to comment.