add r2 score

This commit is contained in:
bastien ollier
2024-06-26 10:59:25 +02:00
parent 27e69b2af8
commit da1e97f07f
2 changed files with 6 additions and 5 deletions

View File

@@ -67,7 +67,6 @@ if "data" in st.session_state:
fig = plt.figure()
y_pred = [model.predict(pd.DataFrame([pred_value[0]], columns=data_name)) for pred_value in X.values.tolist()]
print([x[0] for x in X.values.tolist()])
cm = confusion_matrix(y, y_pred)
sns.heatmap(cm, annot=True, fmt="d")
@@ -75,9 +74,6 @@ if "data" in st.session_state:
plt.xlabel('Predicted')
plt.ylabel('True')
st.pyplot(fig)
st.pyplot(fig, figsize=(1, 1))
else:
st.error("File not loaded")