Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Return/Render Shap plots in div

$
0
0

I want to return shap plots on the callback of button click which uses drop down values as input :

Following is the code to build shap :

model_shap = RandomForestRegressor(random_state=37,max_depth= 11, max_features= ‘log2’, n_estimators= 100)
model_shap.fit(modeldata[s_final_v1],filtered_target)
shap_values = shap.TreeExplainer(model_shap).shap_values(model_data[s_final_v1])
shap.summary_plot(shap_values, model_data[s_final_v1],show=False)

Can anyone suggest how to return this to div on a button click ?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles