From d6c632a361fd07242695b6db9f01aeecf04818e9 Mon Sep 17 00:00:00 2001 From: yagudin Date: Thu, 3 Jun 2021 00:48:38 +0300 Subject: [PATCH] Testing error in production --- strmlt.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/strmlt.py b/strmlt.py index b5079df..08edfc4 100644 --- a/strmlt.py +++ b/strmlt.py @@ -164,15 +164,16 @@ 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) - 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.") + 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) # st.write(f"Your over/under- confidence score is {overconf:.2f}.")