Skip to content

Instantly share code, notes, and snippets.

View peet-droid's full-sized avatar

Peet Kumar Ghosh peet-droid

View GitHub Profile
@peet-droid
peet-droid / confusion_matrix_fromArray.py
Created December 17, 2022 14:53
It creates the Confusion matrix
from sklearn.metrics import confusion_matrix
import matplotlib.pyplot as plt
import seaborn as sn
cfm = confusion_matrix(y_true, y_pred)
classes = ['door_close', 'door_open', 'door_stop', 'unknown']
df_cfm = pd.DataFrame(cfm, index = classes, columns = classes)
plt.figure(figsize = (10,7))