hlnicholls commited on
Commit
f9141ae
·
1 Parent(s): 750543c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -134,10 +134,10 @@ if len(gene_list) > 1:
134
  st.caption("SHAP Summary Plot of All Input Genes")
135
  st.pyplot(fig=summary_plot)
136
  st.caption("Interactive SHAP Summary Plot of All Input Genes")
137
- mpl_fig = shap_summary_plot(shap_values, df_shap, max_display=20, show=False)
138
  plotly_fig = tls.mpl_to_plotly(mpl_fig)
139
  plotly_fig['layout'] = {'xaxis': {'title': 'SHAP value (impact on model output)'}}
140
-
141
  feature_order = np.argsort(np.sum(np.abs(shap_values), axis=0)[:-1])
142
  feature_order = feature_order[-min(max_display, len(feature_order)):]
143
  text = gene_list
 
134
  st.caption("SHAP Summary Plot of All Input Genes")
135
  st.pyplot(fig=summary_plot)
136
  st.caption("Interactive SHAP Summary Plot of All Input Genes")
137
+ mpl_fig = shap_summary_plot(shap_values, df_shap, max_display=8, show=False)
138
  plotly_fig = tls.mpl_to_plotly(mpl_fig)
139
  plotly_fig['layout'] = {'xaxis': {'title': 'SHAP value (impact on model output)'}}
140
+ max_display=8
141
  feature_order = np.argsort(np.sum(np.abs(shap_values), axis=0)[:-1])
142
  feature_order = feature_order[-min(max_display, len(feature_order)):]
143
  text = gene_list