IUM_06
This commit is contained in:
parent
0920a59d1f
commit
3f95fa102c
@ -2,4 +2,4 @@ FROM ubuntu:latest
|
||||
|
||||
RUN apt update && apt install -y python3-pip
|
||||
|
||||
RUN pip install pandas numpy scikit-learn tensorflow
|
||||
RUN pip install pandas numpy scikit-learn tensorflow matplotlib
|
14
plot.py
14
plot.py
@ -1,15 +1,23 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def main():
|
||||
accuracy = []
|
||||
build_numbers = []
|
||||
|
||||
with open("evaluation/metrics.txt") as f:
|
||||
for line in f:
|
||||
if "Accuracy" in line:
|
||||
accuracy.append(float(line.split(":")[1].strip()))
|
||||
accuracy.append(float(line.split(",")[0]))
|
||||
build_numbers.append(int(line.split(",")[1]))
|
||||
|
||||
build_numbers = np.arange(1, len(accuracy) + 1)
|
||||
plt.plot(build_numbers, accuracy)
|
||||
plt.xlabel("Build Number")
|
||||
plt.ylabel("Accuracy")
|
||||
plt.title("Accuracy of the model over time")
|
||||
plt.show()
|
||||
|
||||
plt.savefig("evaluation/accuracy.png")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -16,7 +16,6 @@ def main():
|
||||
y_pred = y_pred >= 0.5
|
||||
|
||||
os.makedirs("evaluation", exist_ok=True)
|
||||
os.system("rm -rf evaluation/*")
|
||||
np.savetxt("evaluation/y_pred.csv", y_pred, delimiter=",")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user