From df42bfcee064753238a6a13c2f08ce6969780aa3 Mon Sep 17 00:00:00 2001 From: Mateusz Date: Sat, 4 May 2024 16:39:48 +0200 Subject: [PATCH] IUM_06 --- metrics.py | 4 ---- plot.py | 2 +- predict.py | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/metrics.py b/metrics.py index 2807dff..15d4fcd 100644 --- a/metrics.py +++ b/metrics.py @@ -9,10 +9,6 @@ def main(): build_number = sys.argv[1] cm = confusion_matrix(y_test, y_pred) - print( - "Recall metric in the testing dataset: ", - cm[1, 1] / (cm[1, 0] + cm[1, 1]), - ) accuracy = cm[1, 1] / (cm[1, 0] + cm[1, 1]) with open(r"evaluation/metrics.txt", "a") as f: diff --git a/plot.py b/plot.py index 8bd9274..4d5ab87 100644 --- a/plot.py +++ b/plot.py @@ -1,4 +1,3 @@ -import numpy as np import matplotlib.pyplot as plt @@ -15,6 +14,7 @@ def main(): plt.xlabel("Build Number") plt.ylabel("Accuracy") plt.title("Accuracy of the model over time") + plt.xticks(range(min(build_numbers), max(build_numbers) + 1)) plt.show() plt.savefig("evaluation/accuracy.png") diff --git a/predict.py b/predict.py index 068d494..a1d3a3c 100644 --- a/predict.py +++ b/predict.py @@ -4,7 +4,6 @@ os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0" from keras.models import load_model import pandas as pd -from sklearn.metrics import confusion_matrix import numpy as np