Update 'evaluate.py'
This commit is contained in:
parent
0482fe10bc
commit
3c26863f73
@ -20,13 +20,11 @@ test_results = model.evaluate(
|
|||||||
|
|
||||||
# Zapis wartości liczbowej metryki do pliku
|
# Zapis wartości liczbowej metryki do pliku
|
||||||
with open('eval_results.txt', 'a+') as f:
|
with open('eval_results.txt', 'a+') as f:
|
||||||
f.write(str(test_results))
|
f.write(str(test_results) + '\n')
|
||||||
|
|
||||||
# Wygenerowanie i zapisanie do pliku wykresu
|
# Wygenerowanie i zapisanie do pliku wykresu
|
||||||
with open('eval_results.txt') as f:
|
with open('eval_results.txt') as f:
|
||||||
scores = []
|
scores = [float(line) for line in f if line]
|
||||||
for line in f:
|
|
||||||
scores.append(float(line))
|
|
||||||
builds = list(range(1, len(scores) + 1))
|
builds = list(range(1, len(scores) + 1))
|
||||||
|
|
||||||
plot = plt.plot(builds, scores)
|
plot = plt.plot(builds, scores)
|
||||||
|
Loading…
Reference in New Issue
Block a user