有什么方法可以更改深色主题中的图形显示背景颜色或文本颜色?我需要白色背景或白色文字。
该图是IPython.core.display.HTML的对象。
由...生成
shap.force_plot(explainer.expected_value[1], shap_values[1][0,:], X_test.iloc[0,:],link="logit")
感谢您的帮助!
添加matplotlib=True
的参数后,问题已解决。
shap.force_plot(explainer.expected_value[1], shap_values[1][0,:], X_test.iloc[0,:],link="logit", matplotlib=True)
似乎该图是使用matplotlib在html文件上创建的。
为了正确绘图,我首先使用style.use('seaborn-dark')
在Jupyter笔记本的深色模型中。