This issue is same as raised in here
With default waterfall function, we are unable to change the color of waterfall plot.
With this implementation all the existing functions will work "as is" with the enhancement of color customization. With this, the users of shap library can change the waterfall plot color as per their wish/requirement.
Earlier they can see waterfall plot in Red and Blue color only:
Minimal Reproducible Example
import pandas as pd
import numpy as np
import lightgbm as lgbm
import shap
temp = pd.DataFrame(np.random.randint(10,100,(100,10)),columns=["x_"+str(i) for i in range(10)])
temp["y"] = np.sum(temp.iloc[:,:8],axis=1) - np.sum(temp.iloc[:,8:],axis=1)
model = lgbm.LGBMRegressor(n_estimators=2, learning_rate=0.1)
X, y =temp.drop(["y"],axis=1), temp[["y"]]
model.fit(X,y )
explainer = shap.TreeExplainer(model)
idx=70
pred = model.predict(X.iloc[idx:idx+1])
shap_values = explainer(X.iloc[idx:idx+1])
shap.plots.waterfall(shap_values[0], max_display=10, show=False)
Expected Behavior
Color of water fall as defined by user.
Bug report checklist
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest release of shap.
[X] I have confirmed this bug exists on the master branch of shap.
[X] I'd be interested in making a PR to fix this bug
Issue Description
This issue is same as raised in here With default waterfall function, we are unable to change the color of waterfall plot. With this implementation all the existing functions will work "as is" with the enhancement of color customization. With this, the users of shap library can change the waterfall plot color as per their wish/requirement. Earlier they can see waterfall plot in Red and Blue color only:
Minimal Reproducible Example
Expected Behavior
Color of water fall as defined by user.
Bug report checklist
Installed Versions
'0.42.1'