Closed mturoci closed 3 years ago
Visually this looks beautiful! I haven't had a chance to go through code yet, but as an idea you could do the following on the "home page" before someone chooses a Phone Number ( I don't know that it is needed, but it is common to do Global vs. Local explanations):
temp = contributions_df.mean(axis=0).to_numpy()
shap = [(contributions_df.columns[i], temp[i]) for i in range(len(contributions_df.columns))]
shap.sort(key=lambda e : e[1])
display(shap)
col = choose min or max column from Global Shapley
pdp = model.partial_plot(
df,
cols=[col],
plot=True, # change to false, just for debugging
nbins=20 if not df[col].isfactor()[0] else 1 + df[col].nlevels()[0],
)
Added a dark theme as well:
After adding the theme switcher, the input box stands out more. I think it's better.
Thanks for the valuable review @geomodular! Comments addressed.
Sounds good @mtanco! Will also add a global explanation.
Comments addressed except of the last one (waiting for workaround).
@mturoci I added in a check on the column's data type and made a histogram using the bins from the first plot if the data is numeric. This should fix the grouping problem caused by the original pseudo code I sent you :)
Before:
After:
Thanks @mtanco!
Churn risk app redesign
Previous:
https://user-images.githubusercontent.com/64769322/112501274-633e5f00-8d89-11eb-852e-e37ad2e240a0.mov
New:
https://user-images.githubusercontent.com/64769322/112501331-6fc2b780-8d89-11eb-90da-96196ec4d171.mov
This PR:
Thanks @mtanco for DS support!
Future work:
Open questions: