mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
Confusion Matrix function
This commit is contained in:
parent
f9e93bf8ba
commit
bd842f4a2b
|
@ -51,9 +51,4 @@ def make_confusion_matrix(y_true, y_pred, classes=None, figsize=(10, 10), text_s
|
|||
|
||||
# Save the figure to the current working directory
|
||||
if savefig:
|
||||
fig.savefig("confusion_matrix.png")
|
||||
|
||||
y_true = [0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0]
|
||||
y_pred = [0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0]
|
||||
|
||||
make_confusion_matrix(y_true, y_pred)
|
||||
fig.savefig("confusion_matrix.png")
|
Loading…
Reference in New Issue
Block a user