From 7781fb54bca3341de410135afe34b73e8b23b454 Mon Sep 17 00:00:00 2001 From: RAYMOND Olivier <34789438+Isdinval@users.noreply.github.com> Date: Thu, 6 Jun 2024 23:32:31 +0200 Subject: [PATCH] Update dashboard_CLOUD.py --- dashboard_CLOUD.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dashboard_CLOUD.py b/dashboard_CLOUD.py index 945e69d..629398a 100644 --- a/dashboard_CLOUD.py +++ b/dashboard_CLOUD.py @@ -468,6 +468,7 @@ def generate_bivariate_plot(feature1_values, feature2_values, customer_data, sk_ # PREDICTION USING MODEL FOR SELECTED CUSTOMER # ========================================================================= st.header("IV. Model Prediction - Probability of Default ") + st.subheader("IV.1. Probability of Loan Default") input_df = pd.DataFrame([input_data]) probability_class1 = model.predict_proba(input_df)[:, 1] # Get the raw prediction score @@ -508,6 +509,7 @@ def generate_bivariate_plot(feature1_values, feature2_values, customer_data, sk_ # SHAP VALUES FOR SELECTED CUSTOMER # ========================================================================= # SHAP VALUES + st.subheader("IV.2. Importance Feature Analysis (SHAP)") final_estimator = get_final_estimator(model) explainer = shap.TreeExplainer(final_estimator) shap_values = explainer.shap_values(input_df) @@ -519,6 +521,7 @@ def generate_bivariate_plot(feature1_values, feature2_values, customer_data, sk_ # TOP 10 POSITIVE OR NEGATIVE FEATURES # TABLE and MODIFICATION OF VALUES # ========================================================================= + st.subheader("IV.3. Modify Features Value & Re-Predict") # Create two columns for the plots col1, col2 = st.columns(2)