Skip to content

Commit 97f07c8

Browse files
committed
confusion matrix code
1 parent 59de9db commit 97f07c8

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

.DS_Store

-2 KB
Binary file not shown.

graphs/.DS_Store

6 KB
Binary file not shown.

graphs/confusion.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import numpy as np
2+
import seaborn as sns
3+
import matplotlib.pyplot as plt
4+
5+
conf_matrix = np.array([[79, 7],
6+
[1, 0]])
7+
8+
sns.heatmap(conf_matrix, annot=True, fmt="d", cmap="Blues",
9+
xticklabels=["Gun", "No Gun"],
10+
yticklabels=["Gun", "No Gun"])
11+
12+
plt.xlabel("Predicted Label")
13+
plt.ylabel("True Label")
14+
plt.title("Confusion Matrix of V2")
15+
16+
plt.show()
17+
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)