shap.utils.approximate_interactions

shap.utils.approximate_interactions(index, shap_values, X, feature_names=None)[源代码]

根据其他功能与给定索引处的功能之间的交互程度对其进行排序。

这只是将特征的SHAP值沿着该特征的值进行分箱。对于SHAP的真实Shapley交互指数值,请参见XGBoost中实现的interaction_contribs选项。