Skip to content
Snippets Groups Projects
Commit 02cd06cc authored by DIANE's avatar DIANE
Browse files

Predictions page enhancement

parent 9356d02a
No related branches found
No related tags found
No related merge requests found
{"Scatter": "Non", "Saitzky-Golay derivative parameters": {"polyorder": 0, "deriv": 0, "window_length": 23}}
\ No newline at end of file
...@@ -94,7 +94,7 @@ elif file == files_format[1]: ...@@ -94,7 +94,7 @@ elif file == files_format[1]:
with NamedTemporaryFile(delete=False, suffix=".dx") as tmp: with NamedTemporaryFile(delete=False, suffix=".dx") as tmp:
tmp.write(data_file.read()) tmp.write(data_file.read())
tmp_path = tmp.name tmp_path = tmp.name
chem_data, spectra, meta_data = read_dx(file = tmp_path) chem_data, spectra, meta_data, meta_data_st = read_dx(file = tmp_path)
M3.success("The data have been loaded successfully", icon="") M3.success("The data have been loaded successfully", icon="")
if chem_data.shape[1]>0: if chem_data.shape[1]>0:
yname = M3.selectbox('Select target', options=chem_data.columns) yname = M3.selectbox('Select target', options=chem_data.columns)
...@@ -196,8 +196,11 @@ if not spectra.empty and not y.empty: ...@@ -196,8 +196,11 @@ if not spectra.empty and not y.empty:
yt = Reg.pred_data_[2] yt = Reg.pred_data_[2]
#if #if
#M2.write('-- Spectral preprocessing info --') M2.write('-- Spectral preprocessing info --')
#M2.write(Reg.best_hyperparams) M2.write(Reg.best_hyperparams)
with open("data/params/Preprocessing.json", "w") as outfile:
json.dump(Reg.best_hyperparams, outfile)
M2.write("-- Performance metrics --") M2.write("-- Performance metrics --")
M2.dataframe(Reg.metrics_) M2.dataframe(Reg.metrics_)
#from st_circular_progress import CircularProgress #from st_circular_progress import CircularProgress
...@@ -207,10 +210,6 @@ if not spectra.empty and not y.empty: ...@@ -207,10 +210,6 @@ if not spectra.empty and not y.empty:
#my_circular_progress.st_circular_progress() #my_circular_progress.st_circular_progress()
#my_circular_progress.update_value(progress=20) #my_circular_progress.update_value(progress=20)
M7.pyplot(reg_plot([y_train, y_train, y_test],[yc, ycv, yt], train_idx = train_index, test_idx = test_index)) M7.pyplot(reg_plot([y_train, y_train, y_test],[yc, ycv, yt], train_idx = train_index, test_idx = test_index))
M8.pyplot(resid_plot([y_train, y_train, y_test],[yc, ycv, yt], train_idx = train_index, test_idx = test_index)) M8.pyplot(resid_plot([y_train, y_train, y_test],[yc, ycv, yt], train_idx = train_index, test_idx = test_index))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment