Compare commits

...

2 Commits

Author SHA1 Message Date
Szymon Bartanowicz
7c8fe37562 fix 2024-05-18 19:43:36 +02:00
Szymon Bartanowicz
4a7fe811f5 evaluation metrics plot 2024-05-15 00:57:08 +02:00
2 changed files with 3 additions and 8 deletions

View File

@ -6,12 +6,9 @@ import sys
data = pd.read_csv('powerlifting_test_predictions.csv')
y_pred = data['predicted_TotalKg']
y_test = data['actual_TotalKg']
y_test_binary = (y_test >= 3).astype(int)
# build_number = sys.argv[1]
build_number = 1
build_number = sys.argv[1]
rmse = sqrt(mean_squared_error(y_test, y_pred))
with open(r"metrics.txt", "a") as f:
f.write(f"{123},{1}\n")
f.write(f"{build_number},{rmse}\n")

View File

@ -4,7 +4,7 @@ def main():
accuracy = []
build_numbers = []
with open("maetrics.txt") as f:
with open("metrics.txt") as f:
for line in f:
accuracy.append(float(line.split(",")[0]))
build_numbers.append(int(line.split(",")[1]))
@ -14,8 +14,6 @@ def main():
plt.ylabel("RMSE")
plt.title("RMSE of the model over time")
plt.xticks(range(min(build_numbers), max(build_numbers) + 1))
plt.show()
plt.savefig("plot.png")
if __name__ == "__main__":