ium_464914/plot.py

21 lines
468 B
Python
Raw Permalink Normal View History

2024-04-30 16:25:37 +02:00
import matplotlib.pyplot as plt
import numpy as np
accuracy = []
f = open("metrics.txt", "r")
for line in f:
parts = line.strip().split(' ')
if(parts[0] == 'Accuracy:'):
accuracy.append(float(parts[1]))
2024-04-30 16:29:27 +02:00
build_numbers = np.arange(1, len(accuracy) + 1)
2024-04-30 16:25:37 +02:00
2024-04-30 19:32:52 +02:00
plt.plot(build_numbers, accuracy, marker='o', linestyle='-', color='b')
2024-04-30 16:25:37 +02:00
plt.xlabel('Build Number')
plt.ylabel('Accuracy')
plt.title('Accuracy Plot')
plt.grid(True)
plt.show()
plt.savefig('accuracy.png')