intial commit (forked from private repo)
This commit is contained in:
16
extracted_cells/cell12.py
Normal file
16
extracted_cells/cell12.py
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
# Confusion Matrix
|
||||
cm = confusion_matrix(y_test, y_pred)
|
||||
plt.figure(figsize=(8, 6))
|
||||
sns.heatmap(cm, annot=True, fmt='d', cmap='Blues', cbar=False,
|
||||
xticklabels=['<=50K', '>50K'],
|
||||
yticklabels=['<=50K', '>50K'])
|
||||
plt.xlabel('Vorhergesagt')
|
||||
plt.ylabel('Tatsächlich')
|
||||
plt.title('Confusion Matrix')
|
||||
plt.savefig('output/Confusions_Matrix.png', dpi=300)
|
||||
plt.show()
|
||||
|
||||
# Klassifikationsbericht
|
||||
print("\nKlassifikationsbericht:")
|
||||
print(classification_report(y_test, y_pred, target_names=['<=50K', '>50K']))
|
||||
Reference in New Issue
Block a user