Skip to content

Commit

Permalink
Merge branch 'main' of github.com:UBC-MDS/DSCI-522-2425-team35-Heart_…
Browse files Browse the repository at this point in the history
…disease_diagnostic_machine into quarto_report
  • Loading branch information
seshafi committed Dec 8, 2024
2 parents 632bab5 + 7e759f6 commit 048f2fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Binary file modified results/figures/confusion_matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion scripts/5_evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ def main(train, test, write_to):

# Save confusion matrix
confmat = ConfusionMatrixDisplay.from_estimator(best_model, X_test, y_test, values_format="d")
confmat.figure_.savefig(os.path.join(write_to, "figures", "confusion_matrix.png"))
confmat.figure_.set_size_inches(10, 7) # Set custom figure size
confmat.figure_.tight_layout()
confmat.figure_.savefig(
os.path.join(write_to, "figures", "confusion_matrix.png"),
bbox_inches='tight'
)


if __name__ == '__main__':
main()

0 comments on commit 048f2fe

Please sign in to comment.