2022-04-27 21:06:37 +02:00
|
|
|
import tensorflow as tf
|
|
|
|
import os
|
|
|
|
import pandas as pd
|
|
|
|
import numpy as np
|
|
|
|
import csv
|
|
|
|
from sklearn.model_selection import train_test_split
|
2022-05-01 19:50:46 +02:00
|
|
|
from matplotlib import pyplot as plt
|
2022-04-27 21:06:37 +02:00
|
|
|
|
|
|
|
x_test = pd.read_csv('xtest.csv')
|
|
|
|
y_test = pd.read_csv('ytest.csv')
|
|
|
|
|
|
|
|
model = tf.keras.models.load_model('./model')
|
|
|
|
|
2022-04-28 20:19:31 +02:00
|
|
|
res = model.evaluate(x_test, y_test,verbose=0)
|
|
|
|
|
|
|
|
with open('evaluation_acuraccy.txt', 'a+') as f:
|
2022-05-01 19:50:46 +02:00
|
|
|
f.write(str(res[1])+'\n')
|
|
|
|
with open('evaluation_acuraccy.txt') as f:
|
|
|
|
scores = [float(line) for line in f if line]
|
|
|
|
print(scores)
|
|
|
|
builds = list(range(1, len(scores) + 1))
|
|
|
|
plot = plt.plot(builds, scores)
|
|
|
|
plt.xlabel('Build')
|
|
|
|
plt.xticks(range(1, len(scores) + 1))
|
|
|
|
plt.ylabel('Accuraccy')
|
2022-05-01 20:06:52 +02:00
|
|
|
plt.show()
|
|
|
|
plt.savefig('accuraccy.png')
|