21 lines
541 B
Python
21 lines
541 B
Python
import pandas as pd
|
|
from tensorflow import keras
|
|
import numpy as np
|
|
from sklearn.metrics import accuracy_score
|
|
np.set_printoptions(threshold=np.inf)
|
|
|
|
data = pd.read_csv("df_test.csv")
|
|
X_test = data.drop("Performance Index", axis=1)
|
|
y_test = data["Performance Index"]
|
|
|
|
model = keras.models.load_model("model.keras")
|
|
|
|
predictions = model.predict(X_test)
|
|
|
|
with open("predictions.txt", "w") as f:
|
|
f.write(str(predictions))
|
|
|
|
accuracy = accuracy_score(y_test, predictions)
|
|
with open("accuracy.txt", 'a') as file:
|
|
file.write(str(accuracy))
|