Skip to content
Snippets Groups Projects
Commit 442fce35 authored by DIANE's avatar DIANE
Browse files

enhancements and results download

parent 679ce792
No related branches found
No related tags found
No related merge requests found
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
base="light" base="light"
primaryColor="#7ab0c7" primaryColor="#7ab0c7"
secondaryBackgroundColor="#7ab0c7" secondaryBackgroundColor="#7ab0c7"
textColor="#000000" textColor="#000000"
\ No newline at end of file
[server]
maxUploadSize = 200
...@@ -55,6 +55,7 @@ def reg_plot( meas, pred, train_idx, test_idx): ...@@ -55,6 +55,7 @@ def reg_plot( meas, pred, train_idx, test_idx):
ax.set_xlabel('Measured values') ax.set_xlabel('Measured values')
plt.legend() plt.legend()
plt.margins(0) plt.margins(0)
# fig.savefig('./Report/figures/measured_vs_predicted.png')
return fig return fig
@st.cache_data @st.cache_data
...@@ -84,16 +85,17 @@ def resid_plot( meas, pred, train_idx, test_idx): ...@@ -84,16 +85,17 @@ def resid_plot( meas, pred, train_idx, test_idx):
for i, txt in enumerate(train_idx): for i, txt in enumerate(train_idx):
#plt.annotate(txt ,(np.array(meas[0]).reshape(-1)[i],ec[i])) #plt.annotate(txt ,(np.array(meas[0]).reshape(-1)[i],ec[i]))
if np.abs(e[0][i])> np.mean(e[0])+ 3*np.std(e[0]): if np.abs(e[0][i])> np.mean(e[0])+ 3*np.std(e[0]):
plt.annotate(txt ,(np.array(meas[0]).reshape(-1)[i],e[0][i])) plt.annotate(txt ,(np.array(pred[0]).reshape(-1)[i],e[0][i]))
for i, txt in enumerate(test_idx): for i, txt in enumerate(test_idx):
if np.abs(e[1][i])> np.mean(e[1])+ 3*np.std(e[1]): if np.abs(e[1][i])> np.mean(e[1])+ 3*np.std(e[1]):
plt.annotate(txt ,(np.array(meas[1]).reshape(-1)[i],e[1][i])) plt.annotate(txt ,(np.array(pred[1]).reshape(-1)[i],e[1][i]))
ax.set_xlabel(f'{ train_idx.shape}') ax.set_xlabel(f'{ train_idx.shape}')
ax.set_ylabel('Residuals') ax.set_ylabel('Residuals')
ax.set_xlabel('Predicted values') ax.set_xlabel('Predicted values')
plt.legend() plt.legend()
plt.margins(0) plt.margins(0)
# fig.savefig('./Report/figures/residuals_plot.png')
return fig return fig
...@@ -137,6 +139,7 @@ def desc_stats(x): ...@@ -137,6 +139,7 @@ def desc_stats(x):
def hash_data(data): def hash_data(data):
import xxhash
"""Hash various data types using MD5.""" """Hash various data types using MD5."""
# Convert to a string representation # Convert to a string representation
...@@ -164,6 +167,6 @@ def hash_data(data): ...@@ -164,6 +167,6 @@ def hash_data(data):
data_bytes = data_str.encode() data_bytes = data_str.encode()
# Compute the MD5 hash # Compute the MD5 hash
md5_hash = hashlib.md5(data_bytes).hexdigest() md5_hash = xxhash.xxh32(data_bytes).hexdigest()
return md5_hash return str(md5_hash)
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment