Revert testing changes

This commit is contained in:
yagudin 2021-06-03 01:08:35 +03:00
parent 4c8b142db3
commit a2719c6ea2

View File

@ -164,16 +164,27 @@ if __name__ == "__main__":
) )
# --- # ---
for strategy in ['uniform', 'quantile']:
for n_bins in range(30, 300, 10):
try:
fig = plotly_calibration(y_true, y_pred, n_bins=n_bins, strategy=strategy)
# st.plotly_chart(fig, use_container_width=True)
fig = plotly_calibration_odds(y_true, y_pred, n_bins=n_bins, strategy=strategy) try:
# st.plotly_chart(fig, use_container_width=True) fig = plotly_calibration(y_true, y_pred, n_bins=n_bins, strategy=strategy)
except Exception as e: st.plotly_chart(fig, use_container_width=True)
st.warning("Hey! Unfortunately, a very mysterious error occured. Try refreshing the page or changing the number of bins a bit.")
fig = plotly_calibration_odds(y_true, y_pred, n_bins=n_bins, strategy=strategy)
st.plotly_chart(fig, use_container_width=True)
except Exception as e:
st.warning("Hey! Unfortunately, a very mysterious error occured. Try refreshing the page or changing the number of bins a bit.")
# for strategy in ['uniform', 'quantile']:
# for n_bins in range(30, 300, 10):
# try:
# fig = plotly_calibration(y_true, y_pred, n_bins=n_bins, strategy=strategy)
# # st.plotly_chart(fig, use_container_width=True)
# fig = plotly_calibration_odds(y_true, y_pred, n_bins=n_bins, strategy=strategy)
# # st.plotly_chart(fig, use_container_width=True)
# except Exception as e:
# st.warning("Hey! Unfortunately, a very mysterious error occured. Try refreshing the page or changing the number of bins a bit.")
# overconf = overconfidence(y_true, y_pred) # overconf = overconfidence(y_true, y_pred)
# st.write(f"Your over/under- confidence score is {overconf:.2f}.") # st.write(f"Your over/under- confidence score is {overconf:.2f}.")