通過關(guān)鍵字feature_names、interaction_index指定特征集名稱,以及用于交互的特征,show=False指定不顯示圖像,可以進(jìn)一步設(shè)置后通過plt保存
features_names_list=["a","b","c"]
shap.dependence_plot(i, shap_values[0], X_test, feature_names=feature_names_list, interaction_index="b", show=False)