2024-04-03 09:39:37 +02:00
|
|
|
import pandas as pd
|
|
|
|
from tensorflow import keras
|
|
|
|
import numpy as np
|
2024-05-14 22:23:41 +02:00
|
|
|
from sklearn.metrics import root_mean_squared_error
|
2024-04-03 09:39:37 +02:00
|
|
|
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))
|
2024-05-14 22:17:35 +02:00
|
|
|
|
2024-05-14 22:23:41 +02:00
|
|
|
accuracy = root_mean_squared_error(y_test, predictions)
|
2024-05-14 22:17:35 +02:00
|
|
|
with open("accuracy.txt", 'a') as file:
|
|
|
|
file.write(str(accuracy))
|