Updates
This commit is contained in:
@@ -54,6 +54,13 @@ def evaluation(y_true, y_pred, clf_name):
|
||||
print(f" {digit}: {acc:.3f} {bar}")
|
||||
print()
|
||||
|
||||
print("Confusion matrix (row=actual, col=predicted):")
|
||||
header = " " + "".join(f"{d:5d}" for d in range(10))
|
||||
print(header)
|
||||
for actual, row in enumerate(cm):
|
||||
print(f" {actual:3d} " + "".join(f"{v:5d}" for v in row))
|
||||
print()
|
||||
|
||||
|
||||
def error_analysis(X, y_true, y_pred, n):
|
||||
errors = [
|
||||
|
||||
Reference in New Issue
Block a user